Skip to content

Commit 8798c97

Browse files
committed
fix new themoviedb_id format
1 parent 0f0000e commit 8798c97

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/update.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export type AnimeListsSchema = Array<{
2525
animenewsnetwork_id?: number
2626
animecountdown_id?: number
2727
simkl_id?: number
28-
themoviedb_id?: number | "unknown"
28+
themoviedb_id?: { [Key in "tv" | "movie"]?: number | "unknown" }
2929
tvdb_id?: number
3030
season?: {
3131
tvdb?: number
@@ -104,7 +104,7 @@ export const formatEntry = (entry: AnimeListsSchema[number]): Relation => ({
104104
media: handleBadValues(entry.type),
105105
myanimelist: handleBadValues(entry.mal_id),
106106
simkl: handleBadValues(entry.simkl_id),
107-
themoviedb: handleBadValues(entry.themoviedb_id),
107+
themoviedb: handleBadValues(entry.themoviedb_id?.tv ?? entry.themoviedb_id?.movie),
108108
"themoviedb-season": handleBadValues(entry.season?.tmdb),
109109
thetvdb: handleBadValues(entry.tvdb_id),
110110
"thetvdb-season": handleBadValues(entry.season?.tvdb),

0 commit comments

Comments
 (0)