From 71e95000c13d7d9356ab0ee9046ffdc25465d9e6 Mon Sep 17 00:00:00 2001 From: kaliko Date: Wed, 28 Apr 2021 13:00:13 +0200 Subject: [PATCH] Add support of musicbrainz_{albumid,trackid} in Track object --- doc/Changelog | 3 ++- sima/lib/track.py | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/Changelog b/doc/Changelog index 9be8db4..2bf9ed9 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -5,11 +5,12 @@ MPD_sima v0.17.0.dev0 * Fixed issue with un-tagged titles (closes #40) * Fixed "artist with quotes not found" (closes #41) * Fixed bad pid in Uniq core plugin (closes #32) - * Use duration instead of time in Track objects (closes #37) * Move "test-tags-config" as positional argument "config-test" * Move "--create-db" as positional argument "create-db" * Add mpd-sima commands as positional arguments: config-test, create-db, generate-config, purge-history + * Use duration instead of time in Track object (closes #37) + * Use musicbrainz_albumid|trackid tags in Tracks object -- kaliko UNRELEASED diff --git a/sima/lib/track.py b/sima/lib/track.py index 846abce..d83bc63 100644 --- a/sima/lib/track.py +++ b/sima/lib/track.py @@ -33,13 +33,14 @@ class Track: :param str file: media file, defaults to ``None`` :param int duration: duration in second, defaults to 0 :param int pos: position in queue, defaults to -1 - :param str title|artist|album: defaults to "" - :param str musicbrainz_artistid|musicbrainz_albumartistid: MusicBrainz IDs, defaults to ``None`` + :param str title|artist|album|albumartist: defaults to "" + :param str musicbrainz_{artistid|albumartistid|albumid|trackid}: MusicBrainz IDs, defaults to ``None`` """ def __init__(self, file=None, duration=0, pos=-1, **kwargs): self.title = self.artist = self.album = self.albumartist = '' self.musicbrainz_artistid = self.musicbrainz_albumartistid = None + self.musicbrainz_albumid = self.musicbrainz_trackid = None self.pos = int(pos) self._file = file self._empty = False -- 2.39.2