Flatten lib/types/title.ts → lib/types.ts and update all imports

- Rename `lib/types/title.ts` → `lib/types.ts` (remove nested directory)
- Update all imports across services, atoms, components, and utils
  from `@/lib/types/title` to `@/lib/types`
This commit is contained in:
2026-03-08 12:26:00 -04:00
parent 609f984aa0
commit a7b3600d15
18 changed files with 17 additions and 16 deletions
+1 -1
View File
@@ -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");
+1 -1
View File
@@ -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");
+1 -1
View File
@@ -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";
+1 -1
View File
@@ -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");
+1
View File
@@ -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");
View File
+1 -1
View File
@@ -1,4 +1,4 @@
import type { ColorPalette } from "@/lib/types/title";
import type { ColorPalette } from "@/lib/types";
/** @internal */
export function hexToRelativeLuminance(hex: string): number {