WMA
The WMA implementation of a LocalTrack
.
Classes:
|
|
|
|
|
- class musify.libraries.local.track.wma.WMATagReader(file, tag_map, remote_wrangler=None)
Bases:
TagReader
[ASF
]Methods:
read_tag
(tag_ids)Extract all tag values from file for a given list of tag IDs
Extract image from file
- read_tag(tag_ids)
Extract all tag values from file for a given list of tag IDs
- Return type:
list
[Any
] |None
- read_images()
Extract image from file
- class musify.libraries.local.track.wma.WMATagWriter(file, tag_map, remote_wrangler=None)
Bases:
TagWriter
[ASF
]Methods:
write_tag
(tag_id, tag_value[, dry_run])Generic method for updating a tag value in the file.
- write_tag(tag_id, tag_value, dry_run=True)
Generic method for updating a tag value in the file.
- Parameters:
tag_id (
str
|None
) – ID of the tag for this file type.tag_value (
Any
) – New value to assign.dry_run (
bool
(default:True
)) – Run function, but do not modify the file on the disk.
- Returns:
bool
– The index number of the conditional that was met to warrant updating the file’s tags. None if none of the conditions were met.
- class musify.libraries.local.track.wma.WMA(file, remote_wrangler=None)
Bases:
LocalTrack
[ASF
,WMATagReader
,WMATagWriter
]Attributes:
Extensions of files that can be loaded by this class.
Map of human-friendly tag name to ID3 tag ids for a given file type
- valid_extensions: frozenset[str] = frozenset({'.wma'})
Extensions of files that can be loaded by this class.
- tag_map = TagMap(title=['Title'], artist=['Author'], album=['WM/AlbumTitle'], album_artist=['WM/AlbumArtist'], track_number=['WM/TrackNumber'], track_total=['TotalTracks', 'WM/TrackNumber'], genres=['WM/Genre'], date=(), year=['WM/Year', 'WM/OriginalReleaseYear'], month=(), day=(), bpm=['WM/BeatsPerMinute'], key=['WM/InitialKey'], disc_number=['WM/PartOfSet'], disc_total=['WM/PartOfSet'], compilation=['COMPILATION'], comments=['Description', 'WM/Comments'], images=['WM/Picture'])
Map of human-friendly tag name to ID3 tag ids for a given file type