mirror of
https://github.com/kikootwo/ReadMeABook.git
synced 2026-06-02 20:30:10 +00:00
Merge pull request #198 from TylerNorris214/main
Add seriesPart metadata tag for Audiobookshelf series ordering
This commit is contained in:
@@ -252,6 +252,8 @@ export class FileOrganizer {
|
||||
narrator: audiobook.narrator,
|
||||
year: audiobook.year,
|
||||
asin: audiobook.asin,
|
||||
series: audiobook.series,
|
||||
seriesPart: audiobook.seriesPart,
|
||||
});
|
||||
|
||||
const successCount = taggingResults.filter((r) => r.success).length;
|
||||
|
||||
@@ -17,6 +17,8 @@ export interface MetadataTaggingOptions {
|
||||
narrator?: string;
|
||||
year?: number;
|
||||
asin?: string;
|
||||
series?: string;
|
||||
seriesPart?: string;
|
||||
}
|
||||
|
||||
export interface TaggingResult {
|
||||
@@ -83,6 +85,14 @@ export async function tagAudioFileMetadata(
|
||||
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)
|
||||
args.push('-f', 'mp4');
|
||||
}
|
||||
@@ -134,6 +144,14 @@ export async function tagAudioFileMetadata(
|
||||
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)
|
||||
args.push('-f', 'mp3');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user