diff --git a/app/(pages)/people/[id]/_components/filmography-grid.tsx b/app/(pages)/people/[id]/_components/filmography-grid.tsx index 0d83aa7..f7291c3 100644 --- a/app/(pages)/people/[id]/_components/filmography-grid.tsx +++ b/app/(pages)/people/[id]/_components/filmography-grid.tsx @@ -11,7 +11,7 @@ import { SelectTrigger, SelectValue, } from "@/components/ui/select"; -import type { PersonCredit } from "@/lib/types/title"; +import type { PersonCredit } from "@/lib/types"; type Filter = "all" | "movie" | "tv"; type Sort = "newest" | "rating"; diff --git a/app/(pages)/people/[id]/_components/person-hero.tsx b/app/(pages)/people/[id]/_components/person-hero.tsx index ca7ac32..8947260 100644 --- a/app/(pages)/people/[id]/_components/person-hero.tsx +++ b/app/(pages)/people/[id]/_components/person-hero.tsx @@ -3,7 +3,7 @@ import { format, parseISO } from "date-fns"; import Image from "next/image"; import { ExpandableText } from "@/components/expandable-text"; import { Badge } from "@/components/ui/badge"; -import type { ResolvedPerson } from "@/lib/types/title"; +import type { ResolvedPerson } from "@/lib/types"; interface PersonHeroProps { person: ResolvedPerson; diff --git a/app/(pages)/titles/[id]/_components/cast-carousel.tsx b/app/(pages)/titles/[id]/_components/cast-carousel.tsx index 11bb41e..75e019d 100644 --- a/app/(pages)/titles/[id]/_components/cast-carousel.tsx +++ b/app/(pages)/titles/[id]/_components/cast-carousel.tsx @@ -2,7 +2,7 @@ import { IconUser, IconUsers } from "@tabler/icons-react"; import Image from "next/image"; import Link from "next/link"; import { ScrollArea } from "@/components/ui/scroll-area"; -import type { CastMember } from "@/lib/types/title"; +import type { CastMember } from "@/lib/types"; interface CastCarouselProps { actors: CastMember[]; diff --git a/app/(pages)/titles/[id]/_components/recommendations-grid.tsx b/app/(pages)/titles/[id]/_components/recommendations-grid.tsx index 0fcb5d5..aad3c45 100644 --- a/app/(pages)/titles/[id]/_components/recommendations-grid.tsx +++ b/app/(pages)/titles/[id]/_components/recommendations-grid.tsx @@ -2,7 +2,7 @@ import { IconThumbUp } from "@tabler/icons-react"; import { TitleCard } from "@/components/title-card"; -import type { RecommendedTitle } from "@/lib/types/title"; +import type { RecommendedTitle } from "@/lib/types"; export function RecommendationsGrid({ recommendations, diff --git a/app/(pages)/titles/[id]/_components/title-availability.tsx b/app/(pages)/titles/[id]/_components/title-availability.tsx index f661cf9..4ece767 100644 --- a/app/(pages)/titles/[id]/_components/title-availability.tsx +++ b/app/(pages)/titles/[id]/_components/title-availability.tsx @@ -11,7 +11,7 @@ import { TooltipContent, TooltipTrigger, } from "@/components/ui/tooltip"; -import type { AvailabilityOffer } from "@/lib/types/title"; +import type { AvailabilityOffer } from "@/lib/types"; const MAX_VISIBLE = 4; diff --git a/app/(pages)/titles/[id]/_components/title-cast.tsx b/app/(pages)/titles/[id]/_components/title-cast.tsx index 89a5247..e7d82c5 100644 --- a/app/(pages)/titles/[id]/_components/title-cast.tsx +++ b/app/(pages)/titles/[id]/_components/title-cast.tsx @@ -1,4 +1,4 @@ -import type { CastMember } from "@/lib/types/title"; +import type { CastMember } from "@/lib/types"; import { CastCarousel } from "./cast-carousel"; interface TitleCastProps { diff --git a/app/(pages)/titles/[id]/_components/title-hero.tsx b/app/(pages)/titles/[id]/_components/title-hero.tsx index fab65e9..b30db65 100644 --- a/app/(pages)/titles/[id]/_components/title-hero.tsx +++ b/app/(pages)/titles/[id]/_components/title-hero.tsx @@ -12,7 +12,7 @@ import Image from "next/image"; import type { ReactNode } from "react"; import { ExpandableText } from "@/components/expandable-text"; import { TmdbLogo } from "@/components/tmdb-logo"; -import type { ColorPalette, ResolvedTitle } from "@/lib/types/title"; +import type { ColorPalette, ResolvedTitle } from "@/lib/types"; import { GenreCollapse } from "./genre-collapse"; import { TrailerDialog } from "./trailer-dialog"; diff --git a/app/(pages)/titles/[id]/_components/title-provider.tsx b/app/(pages)/titles/[id]/_components/title-provider.tsx index 2812c66..fe461c2 100644 --- a/app/(pages)/titles/[id]/_components/title-provider.tsx +++ b/app/(pages)/titles/[id]/_components/title-provider.tsx @@ -11,7 +11,7 @@ import { userRatingAtom, userStatusAtom, } from "@/lib/atoms/title"; -import type { Season } from "@/lib/types/title"; +import type { Season } from "@/lib/types"; export function TitleProvider({ titleId, diff --git a/app/(pages)/titles/[id]/_components/title-recommendations.tsx b/app/(pages)/titles/[id]/_components/title-recommendations.tsx index da2f85c..3989ac6 100644 --- a/app/(pages)/titles/[id]/_components/title-recommendations.tsx +++ b/app/(pages)/titles/[id]/_components/title-recommendations.tsx @@ -2,7 +2,7 @@ import { cacheLife, cacheTag } from "next/cache"; import { getSession } from "@/lib/auth/session"; import { getRecommendationsForTitle } from "@/lib/services/discovery"; import { getUserStatusesByTitleIds } from "@/lib/services/tracking"; -import type { RecommendedTitle } from "@/lib/types/title"; +import type { RecommendedTitle } from "@/lib/types"; import { RecommendationsGrid } from "./recommendations-grid"; async function getCachedRecommendations(titleId: string) { diff --git a/app/(pages)/titles/[id]/_components/title-seasons.tsx b/app/(pages)/titles/[id]/_components/title-seasons.tsx index db0cb31..21e7e8d 100644 --- a/app/(pages)/titles/[id]/_components/title-seasons.tsx +++ b/app/(pages)/titles/[id]/_components/title-seasons.tsx @@ -31,7 +31,7 @@ import { userStatusAtom, watchingEpAtom, } from "@/lib/atoms/title"; -import type { Season } from "@/lib/types/title"; +import type { Season } from "@/lib/types"; import { useTitleActions } from "./use-title-actions"; export function TitleSeasons({ diff --git a/app/(pages)/titles/[id]/_components/use-title-actions.ts b/app/(pages)/titles/[id]/_components/use-title-actions.ts index 56f5b07..e1997e1 100644 --- a/app/(pages)/titles/[id]/_components/use-title-actions.ts +++ b/app/(pages)/titles/[id]/_components/use-title-actions.ts @@ -23,7 +23,7 @@ import { userStatusAtom, watchingEpAtom, } from "@/lib/atoms/title"; -import type { Season } from "@/lib/types/title"; +import type { Season } from "@/lib/types"; export function useTitleActions() { const store = useStore(); diff --git a/lib/atoms/title.ts b/lib/atoms/title.ts index 9618bb7..e992e43 100644 --- a/lib/atoms/title.ts +++ b/lib/atoms/title.ts @@ -1,5 +1,5 @@ import { atom } from "jotai"; -import type { Season } from "@/lib/types/title"; +import type { Season } from "@/lib/types"; export const titleIdAtom = atom(""); export const titleTypeAtom = atom<"movie" | "tv">("movie"); diff --git a/lib/services/credits.ts b/lib/services/credits.ts index 4dc92c7..7c9a544 100644 --- a/lib/services/credits.ts +++ b/lib/services/credits.ts @@ -5,7 +5,7 @@ import { persons, titleCast, titles } from "@/lib/db/schema"; import { createLogger } from "@/lib/logger"; import { getMovieCredits, getTvAggregateCredits } from "@/lib/tmdb/client"; import { tmdbImageUrl } from "@/lib/tmdb/image"; -import type { CastMember } from "@/lib/types/title"; +import type { CastMember } from "@/lib/types"; import { cacheProfilePhotos, imageCacheEnabled } from "./image-cache"; const log = createLogger("credits"); diff --git a/lib/services/metadata.ts b/lib/services/metadata.ts index 973e964..11c36a3 100644 --- a/lib/services/metadata.ts +++ b/lib/services/metadata.ts @@ -33,7 +33,7 @@ import type { Episode, ResolvedTitle, Season, -} from "@/lib/types/title"; +} from "@/lib/types"; import { refreshAvailability } from "./availability"; import { extractAndStoreColors, parseColorPalette } from "./colors"; import { getCastForTitle, refreshCredits } from "./credits"; diff --git a/lib/services/person.ts b/lib/services/person.ts index ab7072e..e82d4e2 100644 --- a/lib/services/person.ts +++ b/lib/services/person.ts @@ -4,7 +4,7 @@ import { persons, titleCast, titles } from "@/lib/db/schema"; import { createLogger } from "@/lib/logger"; import { getPersonCombinedCredits, getPersonDetails } from "@/lib/tmdb/client"; import { tmdbImageUrl } from "@/lib/tmdb/image"; -import type { PersonCredit, ResolvedPerson } from "@/lib/types/title"; +import type { PersonCredit, ResolvedPerson } from "@/lib/types"; const log = createLogger("person"); diff --git a/lib/tmdb/client.ts b/lib/tmdb/client.ts index eda3758..3e2f53d 100644 --- a/lib/tmdb/client.ts +++ b/lib/tmdb/client.ts @@ -19,6 +19,7 @@ import type { } from "./types"; const log = createLogger("tmdb"); + function getApiKey() { const key = process.env.TMDB_API_READ_ACCESS_TOKEN; if (!key) throw new Error("TMDB_API_READ_ACCESS_TOKEN is not set"); diff --git a/lib/types/title.ts b/lib/types.ts similarity index 100% rename from lib/types/title.ts rename to lib/types.ts diff --git a/lib/utils/title-theme.ts b/lib/utils/title-theme.ts index 063e84a..86034fd 100644 --- a/lib/utils/title-theme.ts +++ b/lib/utils/title-theme.ts @@ -1,4 +1,4 @@ -import type { ColorPalette } from "@/lib/types/title"; +import type { ColorPalette } from "@/lib/types"; /** @internal */ export function hexToRelativeLuminance(hex: string): number {