mirror of
https://github.com/kikootwo/ReadMeABook.git
synced 2026-06-03 12:50:09 +00:00
Add series and seriesPart to metadata tagging
This commit is contained in:
@@ -17,6 +17,8 @@ export interface MetadataTaggingOptions {
|
|||||||
narrator?: string;
|
narrator?: string;
|
||||||
year?: number;
|
year?: number;
|
||||||
asin?: string;
|
asin?: string;
|
||||||
|
series?: string;
|
||||||
|
seriesPart?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface TaggingResult {
|
export interface TaggingResult {
|
||||||
@@ -83,6 +85,14 @@ export async function tagAudioFileMetadata(
|
|||||||
args.push('-metadata', `----:com.apple.iTunes:ASIN="${escapeMetadata(metadata.asin)}"`);
|
args.push('-metadata', `----:com.apple.iTunes:ASIN="${escapeMetadata(metadata.asin)}"`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (metadata.series) {
|
||||||
|
args.push('-metadata', `show="${escapeMetadata(metadata.series)}"`);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (metadata.seriesPart) {
|
||||||
|
args.push('-metadata', `episode_id="${escapeMetadata(metadata.seriesPart)}"`);
|
||||||
|
}
|
||||||
|
|
||||||
// Explicitly specify output format (fixes .tmp extension issue)
|
// Explicitly specify output format (fixes .tmp extension issue)
|
||||||
args.push('-f', 'mp4');
|
args.push('-f', 'mp4');
|
||||||
}
|
}
|
||||||
@@ -134,6 +144,14 @@ export async function tagAudioFileMetadata(
|
|||||||
args.push('-metadata', `ASIN="${escapeMetadata(metadata.asin)}"`);
|
args.push('-metadata', `ASIN="${escapeMetadata(metadata.asin)}"`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (metadata.series) {
|
||||||
|
args.push('-metadata', `SERIES="${escapeMetadata(metadata.series)}"`);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (metadata.seriesPart) {
|
||||||
|
args.push('-metadata', `SERIES-PART="${escapeMetadata(metadata.seriesPart)}"`);
|
||||||
|
}
|
||||||
|
|
||||||
// Explicitly specify output format (fixes .tmp extension issue)
|
// Explicitly specify output format (fixes .tmp extension issue)
|
||||||
args.push('-f', 'mp3');
|
args.push('-f', 'mp3');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user