Defines some object to handle audio file metadata
"""
-import collections.abc # python >= 3.3
+try:
+ from collections.abc import Set # python >= 3.3
+except ImportError:
+ from collections import Set # python 3.2
import logging
import re
if 'mbid' in kwargs and kwargs.get('mbid'):
try:
is_uuid4(kwargs.get('mbid'))
- self.__mbid = kwargs.pop('mbid').upper()
+ self.__mbid = kwargs.pop('mbid').lower()
except WrongUUID4:
- self.log.warning('Wrong mbid {}:{}'.format(self.__name,
- kwargs.get('mbid')))
+ self.log.warning('Wrong mbid %s:%s', self.__name,
+ kwargs.get('mbid'))
# mbid immutable as hash rests on
self.__dict__.update(**kwargs)
mbid = kwargs.get('musicbrainz_albumartistid').split(', ')[0]
super().__init__(name=name, mbid=mbid)
-class MetaContainer(collections.abc.Set):
+class MetaContainer(Set):
def __init__(self, iterable):
self.elements = lst = []