diff options
| author | Robert Honz <exislow+github@gmail.com> | 2025-10-17 13:46:47 +0200 |
|---|---|---|
| committer | Robert Honz <exislow+github@gmail.com> | 2025-10-17 13:46:47 +0200 |
| commit | a2e637e89c3b719a53911f688a48546afdc0832c (patch) | |
| tree | ed19df70422d01c65afa7fbff84ec8063972d03b /tidal_dl_ng/constants.py | |
| parent | e8bf12747f3eb33979d6242f2d0a6f57d3e95043 (diff) | |
| download | tidal-dl-ng-a2e637e89c3b719a53911f688a48546afdc0832c.tar.gz | |
feat(metadata): ✨ add UPC metadata handling and configuration
* 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`.
Diffstat (limited to 'tidal_dl_ng/constants.py')
| -rw-r--r-- | tidal_dl_ng/constants.py | 13 |
1 files changed, 13 insertions, 0 deletions
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"}, +} |
