From a2e637e89c3b719a53911f688a48546afdc0832c Mon Sep 17 00:00:00 2001 From: Robert Honz Date: Fri, 17 Oct 2025 13:46:47 +0200 Subject: feat(metadata): ✨ add UPC metadata handling and configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Introduced `MetadataTargetUPC` enum for target metadata tags. * Added `METADATA_LOOKUP_UPC` dictionary for mapping file formats to UPC tags. * Updated `Metadata` class to include `target_upc` for dynamic UPC tag assignment. * Enhanced `Settings` class to allow configuration of `metadata_target_upc`. --- tidal_dl_ng/constants.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tidal_dl_ng/constants.py') diff --git a/tidal_dl_ng/constants.py b/tidal_dl_ng/constants.py index 2e75153..0630137 100644 --- a/tidal_dl_ng/constants.py +++ b/tidal_dl_ng/constants.py @@ -70,3 +70,16 @@ class AudioExtensionsValid(StrEnum): MP3 = ".mp3" OGG = ".ogg" ALAC = ".alac" + + +class MetadataTargetUPC(StrEnum): + UPC = "UPC" + BARCODE = "BARCODE" + EAN = "EAN" + + +METADATA_LOOKUP_UPC: dict[str, dict[str, str]] = { + "UPC": {"MP3": "UPC", "MP4": "UPC", "FLAC": "UPC"}, + "BARCODE": {"MP3": "BARCODE", "MP4": "BARCODE", "FLAC": "BARCODE"}, + "EAN": {"MP3": "EAN", "MP4": "EAN", "FLAC": "EAN"}, +} -- cgit v1.3.1