Base
Classes:
|
Base tag processor for reading/writing of tag metadata to a file. |
- class musify.libraries.local.track.tags.base.TagProcessor(file, tag_map, remote_wrangler=None)
Bases:
ABC
,Generic
Base tag processor for reading/writing of tag metadata to a file.
- Parameters:
file (
TypeVar
(T
, bound=FileType
)) – The loaded Mutagen object of the file to extract tags from.tag_map (
TagMap
) – The map of tag names to tag IDs for the given file type.remote_wrangler (
RemoteDataWrangler
|None
(default:None
)) – Optionally, provide aRemoteDataWrangler
object for processing URIs. This object will be used to check for and validate a URI tag on the file. The tag that is used for reading and writing is set by theuri_tag
class attribute. If noremote_wrangler
is given, no URI processing will occur.
Attributes:
The tag field to use as the URI tag in the file's metadata
The separator to use when representing separated tag values as a combined string.
The name of the remote service for which this TagProcessor can process remote data.
The value to use as a URI for an item which does not have an associated remote object.
-
uri_tag:
LocalTrackField
= 44 The tag field to use as the URI tag in the file’s metadata
-
num_sep:
str
= '/' The separator to use when representing separated tag values as a combined string. Used when some number type tag values come as a combined string i.e. track number/track total
- property remote_source: str | None
The name of the remote service for which this TagProcessor can process remote data.
The value to use as a URI for an item which does not have an associated remote object. An item that has this URI value will be excluded from most remote logic. If no remote_wrangler has been assigned to this object, return None.
- file
- tag_map
- remote_wrangler