added mapping enum

This commit is contained in:
Lars Noack 2023-01-09 14:21:49 +01:00
parent dc4ac25319
commit a8bf1ad921
2 changed files with 63 additions and 1 deletions

View File

@ -171,7 +171,8 @@ class Song(DatabaseObject):
self.artist_names = artist_names
self.tracksort: int | None = tracksort
self.metadata = Metadata(data=metadata)
# self.metadata = Metadata(data=metadata)
self.metadata = None
if sources is None:
sources = []

View File

@ -0,0 +1,61 @@
from enum import Enum
class Mapping(Enum):
DATE = "TYER"
UNSYNCED_LYRICS = "USLT"
TRACKNUMBER = "TRCK"
TOTALTRACKS = "TRCK" # Stored in the same frame with TRACKNUMBER, separated by '/': e.g. '4/9'.
TITLE = "TIT2"
TITLESORTORDER = "TSOT"
ENCODING_SETTINGS = "TSSE"
SUBTITLE = "TIT3"
SET_SUBTITLE = "TSST"
RELEASE_DATE = "TDRL"
RECORDING_DATES = "TXXX"
PUBLISHER_URL = "WPUB"
PUBLISHER = "TPUB"
RATING = "POPM"
PAYMEMT_URL = "WPAY"
DISCNUMBER = "TPOS"
MOVEMENT_COUNT = "MVIN"
TOTALDISCS = "TPOS"
ORIGINAL_RELEASE_DATE = "TDOR"
ORIGINAL_ARTIST = "TOPE"
ORIGINAL_ALBUM = "TOAL"
INTERNET_RADIO_WEBPAGE_URL = "WORS"
SOURCE_WEBPAGE_URL = "WOAS"
FILE_WEBPAGE_URL = "WOAF"
ARTIST_WEBPAGE_URL = "WOAR"
MOVEMENT_INDEX = "MVIN"
MOVEMENT_NAME = "MVNM"
MEDIA_TYPE = "TMED"
LYRICIST = "TEXT"
WRITER = "TEXT"
ARTIST = "TPE1"
LANGUAGE = "TLAN"
ITUNESCOMPILATION = "TCMP"
ISRC = "TSRC"
REMIXED_BY = "TPE4"
RADIO_STATION_OWNER = "TRSO"
RADIO_STATION = "TRSN"
INITIAL_KEY = "TKEY"
OWNER = "TOWN"
ENCODED_BY = "TENC"
COPYRIGHT_URL = "WCOP"
COPYRIGHT = "TCOP"
GENRE = "TCON"
GROUPING = "TIT1"
CONDUCTOR = "TPE3"
COMPOSERSORTORDER = "TSOC"
COMPOSER = "TCOM"
COMMERCIAL_INFORMATION_URL = "WCOM"
COMMENT = "COMM"
BPM = "TBPM"
ALBUM_ARTIST = "TPE2"
BAND = "TPE2"
ARTISTSORTORDER = "TSOP"
ALBUM = "TALB"
ALBUMSORTORDER = "TSOA"
ALBUMARTISTSORTORDER = "TSO2"