align with metadata standard
This commit is contained in:
@@ -189,9 +189,6 @@ export class DuplicateIndex {
|
||||
if (metadata.title) {
|
||||
return metadata.title;
|
||||
}
|
||||
if (metadata.titles?.eng) {
|
||||
return metadata.titles.eng;
|
||||
}
|
||||
if (metadata.originalTitle) {
|
||||
return metadata.originalTitle;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ const CONSUMER_GROUP = 'meta-dup-meta-consumer';
|
||||
|
||||
// Fields that affect title duplicate detection
|
||||
const TITLE_FIELDS = [
|
||||
'title', 'titles/eng', 'originalTitle', 'fileName',
|
||||
'title', 'originalTitle', 'fileName',
|
||||
'year', 'movieYear', 'season', 'episode', 'tmdb'
|
||||
];
|
||||
|
||||
|
||||
@@ -120,7 +120,6 @@ export interface FileMetadata {
|
||||
|
||||
// Title information (for folder organization)
|
||||
title?: string;
|
||||
titles?: { eng?: string; [key: string]: string | undefined };
|
||||
originalTitle?: string;
|
||||
fileName?: string;
|
||||
|
||||
@@ -436,12 +435,6 @@ export class RedisClient implements Partial<IKVClient> {
|
||||
mtime = isNaN(parsed) ? parseFloat(data.mtime) : parsed;
|
||||
}
|
||||
|
||||
// Parse titles - can be nested object or simple string
|
||||
let titles: { eng?: string; [key: string]: string | undefined } | undefined;
|
||||
if (data['titles/eng']) {
|
||||
titles = { eng: data['titles/eng'] };
|
||||
}
|
||||
|
||||
// Parse season/episode (can be 0 for specials)
|
||||
const season = data.season !== undefined ? parseInt(data.season, 10) : undefined;
|
||||
const episode = data.episode !== undefined ? parseInt(data.episode, 10) : undefined;
|
||||
@@ -472,7 +465,6 @@ export class RedisClient implements Partial<IKVClient> {
|
||||
|
||||
// Title information
|
||||
title: data.title,
|
||||
titles,
|
||||
originalTitle: data.originalTitle,
|
||||
fileName: data.fileName,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user