sign every write as an MMUR2 claim (POST /api/claims); the guessed title is parsedTitle
Build and Push Docker Image / build (push) Successful in 47s
Build and Push Docker Image / build (push) Successful in 47s
This commit is contained in:
+5
-2
@@ -30,7 +30,7 @@ export const manifest: PluginManifest = {
|
||||
defaultQueue: 'fast',
|
||||
timeout: 30000,
|
||||
schema: {
|
||||
originalTitle: { label: 'Original Title', type: 'string' },
|
||||
parsedTitle: { label: 'Parsed Title', type: 'string', hint: 'title guessed from the filename; never written to title/originalTitle' },
|
||||
videoType: { label: 'Video Type', type: 'string', hint: 'movie or tvshow' },
|
||||
season: { label: 'Season', type: 'string' },
|
||||
episode: { label: 'Episode', type: 'string' },
|
||||
@@ -90,7 +90,10 @@ export async function process(
|
||||
|
||||
// Convert to record for merging
|
||||
const result: Record<string, string> = {};
|
||||
if (metadata.originalTitle) result.originalTitle = metadata.originalTitle;
|
||||
// A filename guess is a different fact from a catalogue title, so it gets
|
||||
// its own key (METADATA_KEYS.md rule #8): written to `originalTitle` it
|
||||
// would compete with tmdb as a separate signer and, being older, win.
|
||||
if (metadata.originalTitle) result.parsedTitle = metadata.originalTitle;
|
||||
if (metadata.season) result.season = metadata.season;
|
||||
if (metadata.episode) result.episode = metadata.episode;
|
||||
if (metadata.increment) result.increment = metadata.increment;
|
||||
|
||||
Reference in New Issue
Block a user