taglib-wasm
Version:
TagLib-Wasm is the universal tagging library for TypeScript/JavaScript platforms: Browsers, Node.js, Deno, Bun, Cloudflare Workers, and Electron apps
255 lines (254 loc) • 5.68 kB
JavaScript
const GENERAL_EXTENDED_PROPERTIES = {
albumArtist: {
key: "ALBUMARTIST",
description: "The album artist (band/orchestra/ensemble)",
type: "string",
supportedFormats: ["ID3v2", "MP4", "Vorbis"],
mappings: {
id3v2: { frame: "TPE2" },
vorbis: "ALBUMARTIST",
mp4: "aART"
}
},
composer: {
key: "COMPOSER",
description: "The original composer(s) of the track",
type: "string",
supportedFormats: ["ID3v2", "MP4", "Vorbis"],
mappings: {
id3v2: { frame: "TCOM" },
vorbis: "COMPOSER",
mp4: "\xA9wrt"
}
},
copyright: {
key: "COPYRIGHT",
description: "Copyright information",
type: "string",
supportedFormats: ["ID3v2", "Vorbis"],
mappings: {
vorbis: "COPYRIGHT"
}
},
encodedBy: {
key: "ENCODEDBY",
description: "The encoding software or person",
type: "string",
supportedFormats: ["ID3v2", "Vorbis"],
mappings: {
vorbis: "ENCODEDBY"
}
},
discNumber: {
key: "DISCNUMBER",
description: "The disc number for multi-disc sets",
type: "string",
supportedFormats: ["ID3v2", "MP4", "Vorbis"],
mappings: {
id3v2: { frame: "TPOS" },
vorbis: "DISCNUMBER",
mp4: "disk"
}
},
bpm: {
key: "BPM",
description: "Beats per minute",
type: "string",
supportedFormats: ["ID3v2", "MP4", "Vorbis"],
mappings: {
id3v2: { frame: "TBPM" },
vorbis: "BPM",
mp4: "tmpo"
}
},
totalTracks: {
key: "TRACKTOTAL",
description: "Total number of tracks on the album",
type: "string",
supportedFormats: ["ID3v2", "MP4", "Vorbis"],
mappings: {
id3v2: { frame: "TRCK" },
vorbis: "TRACKTOTAL",
mp4: "trkn"
}
},
totalDiscs: {
key: "DISCTOTAL",
description: "Total number of discs in the set",
type: "string",
supportedFormats: ["ID3v2", "MP4", "Vorbis"],
mappings: {
id3v2: { frame: "TPOS" },
vorbis: "DISCTOTAL",
mp4: "disk"
}
},
compilation: {
key: "COMPILATION",
description: "Whether the album is a compilation (various artists)",
type: "boolean",
supportedFormats: ["ID3v2", "MP4", "Vorbis"],
mappings: {
id3v2: { frame: "TCMP" },
vorbis: "COMPILATION",
mp4: "cpil"
}
},
// Sorting Properties
titleSort: {
key: "TITLESORT",
description: "Sort name for title (for alphabetization)",
type: "string",
supportedFormats: ["ID3v2", "MP4", "Vorbis"],
mappings: {
id3v2: { frame: "TSOT" },
vorbis: "TITLESORT",
mp4: "sonm"
}
},
artistSort: {
key: "ARTISTSORT",
description: "Sort name for artist (for alphabetization)",
type: "string",
supportedFormats: ["ID3v2", "MP4", "Vorbis"],
mappings: {
id3v2: { frame: "TSOP" },
vorbis: "ARTISTSORT",
mp4: "soar"
}
},
albumSort: {
key: "ALBUMSORT",
description: "Sort name for album (for alphabetization)",
type: "string",
supportedFormats: ["ID3v2", "MP4", "Vorbis"],
mappings: {
id3v2: { frame: "TSOA" },
vorbis: "ALBUMSORT",
mp4: "soal"
}
},
// Additional common properties
lyricist: {
key: "LYRICIST",
description: "The lyrics/text writer(s)",
type: "string",
supportedFormats: ["Vorbis"],
mappings: {
vorbis: "LYRICIST"
}
},
conductor: {
key: "CONDUCTOR",
description: "The conductor",
type: "string",
supportedFormats: ["Vorbis"],
mappings: {
vorbis: "CONDUCTOR"
}
},
remixedBy: {
key: "REMIXER",
description: "Person who remixed the track",
type: "string",
supportedFormats: ["ID3v2", "MP4", "Vorbis"],
mappings: {
id3v2: { frame: "TPE4" },
vorbis: "REMIXER",
mp4: "----:com.apple.iTunes:REMIXER"
}
},
language: {
key: "LANGUAGE",
description: "Language of vocals/lyrics",
type: "string",
supportedFormats: ["Vorbis"],
mappings: {
vorbis: "LANGUAGE"
}
},
publisher: {
key: "PUBLISHER",
description: "The publisher",
type: "string",
supportedFormats: ["Vorbis"],
mappings: {
vorbis: "PUBLISHER"
}
},
mood: {
key: "MOOD",
description: "The mood/atmosphere of the track",
type: "string",
supportedFormats: ["Vorbis"],
mappings: {
vorbis: "MOOD"
}
},
media: {
key: "MEDIA",
description: "Media type (CD, vinyl, etc.)",
type: "string",
supportedFormats: ["Vorbis"],
mappings: {
vorbis: "MEDIA"
}
},
grouping: {
key: "GROUPING",
description: "Content group/work",
type: "string",
supportedFormats: ["Vorbis"],
mappings: {
vorbis: "GROUPING"
}
},
work: {
key: "WORK",
description: "Work name",
type: "string",
supportedFormats: ["Vorbis"],
mappings: {
vorbis: "WORK"
}
},
lyrics: {
key: "LYRICS",
description: "Lyrics content",
type: "string",
supportedFormats: ["Vorbis"],
mappings: {
vorbis: "LYRICS"
}
},
isrc: {
key: "ISRC",
description: "International Standard Recording Code",
type: "string",
supportedFormats: ["Vorbis"],
mappings: {
vorbis: "ISRC"
}
},
catalogNumber: {
key: "CATALOGNUMBER",
description: "Catalog number",
type: "string",
supportedFormats: ["Vorbis"],
mappings: {
vorbis: "CATALOGNUMBER"
}
},
barcode: {
key: "BARCODE",
description: "Barcode (EAN/UPC)",
type: "string",
supportedFormats: ["Vorbis"],
mappings: {
vorbis: "BARCODE"
}
}
};
export {
GENERAL_EXTENDED_PROPERTIES
};