CC-3013: Media Monitor throws exception when trying to convert String to Int.
-fixed -also specified base 10 radix
This commit is contained in:
parent
b14f2e894d
commit
5d0f36f130
|
@ -197,9 +197,9 @@ class AirtimeMetadata:
|
|||
if isinstance(md['MDATA_KEY_TRACKNUMBER'], basestring):
|
||||
match = re.search('^(\d*/\d*)?', md['MDATA_KEY_TRACKNUMBER'])
|
||||
|
||||
if match.group(0) is not u'':
|
||||
md['MDATA_KEY_TRACKNUMBER'] = int(md['MDATA_KEY_TRACKNUMBER'].split("/")[0])
|
||||
else:
|
||||
try:
|
||||
md['MDATA_KEY_TRACKNUMBER'] = int(md['MDATA_KEY_TRACKNUMBER'].split("/")[0], 10)
|
||||
except Exception, e:
|
||||
del md['MDATA_KEY_TRACKNUMBER']
|
||||
|
||||
#make sure bpm is valid, need to check more types of formats for this tag to assure correct parsing.
|
||||
|
|
Loading…
Reference in New Issue