Merge branch '1.9.1' into devel
This commit is contained in:
commit
6291c67ace
1 changed files with 5 additions and 5 deletions
|
@ -166,9 +166,9 @@ class AirtimeMetadata:
|
||||||
#check if file has any metadata
|
#check if file has any metadata
|
||||||
if file_info is not None:
|
if file_info is not None:
|
||||||
for key in file_info.keys() :
|
for key in file_info.keys() :
|
||||||
if key in self.mutagen2airtime :
|
if key in self.mutagen2airtime and len(file_info[key]) > 0:
|
||||||
info = file_info[key][0]
|
info = file_info[key][0]
|
||||||
while 1:
|
while True:
|
||||||
temp = re.search(u"[\x80-\x9f]", info)
|
temp = re.search(u"[\x80-\x9f]", info)
|
||||||
if temp is not None:
|
if temp is not None:
|
||||||
s = temp.group(0)
|
s = temp.group(0)
|
||||||
|
@ -197,9 +197,9 @@ class AirtimeMetadata:
|
||||||
if isinstance(md['MDATA_KEY_TRACKNUMBER'], basestring):
|
if isinstance(md['MDATA_KEY_TRACKNUMBER'], basestring):
|
||||||
match = re.search('^(\d*/\d*)?', md['MDATA_KEY_TRACKNUMBER'])
|
match = re.search('^(\d*/\d*)?', md['MDATA_KEY_TRACKNUMBER'])
|
||||||
|
|
||||||
if match.group(0) is not u'':
|
try:
|
||||||
md['MDATA_KEY_TRACKNUMBER'] = int(md['MDATA_KEY_TRACKNUMBER'].split("/")[0])
|
md['MDATA_KEY_TRACKNUMBER'] = int(md['MDATA_KEY_TRACKNUMBER'].split("/")[0], 10)
|
||||||
else:
|
except Exception, e:
|
||||||
del md['MDATA_KEY_TRACKNUMBER']
|
del md['MDATA_KEY_TRACKNUMBER']
|
||||||
|
|
||||||
#make sure bpm is valid, need to check more types of formats for this tag to assure correct parsing.
|
#make sure bpm is valid, need to check more types of formats for this tag to assure correct parsing.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue