mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 03:55:38 -04:00
Rename TMDB_API_KEY to TMDB_API_READ_ACCESS_TOKEN and add optional base URL overrides
Renames the env var for clarity since it holds a read access token, not an API key. Adds optional TMDB_API_BASE_URL and TMDB_IMAGE_BASE_URL env vars for advanced users. Centralizes image URL construction into a shared tmdbImageUrl() helper, replacing hardcoded URLs across all components. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -13,6 +13,7 @@ import { useCallback, useEffect, useState } from "react";
|
||||
import { DashboardSkeleton } from "@/components/skeletons";
|
||||
import { StatsSummary } from "@/components/stats-summary";
|
||||
import { TitleCard } from "@/components/title-card";
|
||||
import { tmdbImageUrl } from "@/lib/tmdb/image";
|
||||
import { useSession } from "@/lib/auth/client";
|
||||
|
||||
interface ContinueWatchingItem {
|
||||
@@ -270,11 +271,9 @@ function FeedSection({
|
||||
}
|
||||
|
||||
function ContinueWatchingCard({ item }: { item: ContinueWatchingItem }) {
|
||||
const stillUrl = item.nextEpisode?.stillPath
|
||||
? `https://image.tmdb.org/t/p/w500${item.nextEpisode.stillPath}`
|
||||
: item.title.backdropPath
|
||||
? `https://image.tmdb.org/t/p/w500${item.title.backdropPath}`
|
||||
: null;
|
||||
const stillUrl =
|
||||
tmdbImageUrl(item.nextEpisode?.stillPath ?? null, "w500") ??
|
||||
tmdbImageUrl(item.title.backdropPath ?? null, "w500");
|
||||
const progress =
|
||||
item.totalEpisodes > 0
|
||||
? (item.watchedEpisodes / item.totalEpisodes) * 100
|
||||
|
||||
Reference in New Issue
Block a user