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
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