X-Git-Url: https://git.kaliko.me/?a=blobdiff_plain;f=sima%2Flib%2Fmeta.py;h=5a2305eceb09169663860083bc43b3122a03e4ab;hb=b36c71a;hp=9d15c69dacef0594f9bdcd7ecd76ac75f04b6c77;hpb=2b41de301271772c0a4667e81e1f2d180f349279;p=mpd-sima.git diff --git a/sima/lib/meta.py b/sima/lib/meta.py index 9d15c69..5a2305e 100644 --- a/sima/lib/meta.py +++ b/sima/lib/meta.py @@ -27,7 +27,7 @@ import logging import re UUID_RE = r'^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[89AB][a-f0-9]{3}-[a-f0-9]{12}$' -# The Track Object is collapsing multiple tags into a single string using this +#: The Track Object is collapsing multiple tags into a single string using this # separator. It is used then to split back the string to tags list. SEPARATOR = chr(0x1F) # ASCII Unit Separator @@ -158,6 +158,13 @@ class Meta: def mbid(self): return self.__mbid + @mbid.setter + def mbid(self, mbid): + if mbid and not is_uuid4(mbid): + self.log.warning('Wrong mbid %s:%s', self.__name, mbid) + return + self.__mbid = mbid + @property def aliases(self): return self.__aliases