MM2:
Fixed wrong use of split (misunderstanding of the maxsplit optional argument)
This commit is contained in:
parent
734be21269
commit
93d21b510c
|
@ -59,4 +59,6 @@ class EventContractor(Loggable):
|
||||||
try: del self.store[evt.path]
|
try: del self.store[evt.path]
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.unexpected_exception(e)
|
self.unexpected_exception(e)
|
||||||
self.logger.info("Unregistering. Left: '%d'" % len(self.store.keys()))
|
# the next line is commented out because it clutters up logging real
|
||||||
|
# bad
|
||||||
|
#self.logger.info("Unregistering. Left: '%d'" % len(self.store.keys()))
|
||||||
|
|
|
@ -247,7 +247,7 @@ def normalized_metadata(md, original_path):
|
||||||
# Note: I don't know why I'm doing a unicode string comparison here
|
# Note: I don't know why I'm doing a unicode string comparison here
|
||||||
# that part is copied from the original code
|
# that part is copied from the original code
|
||||||
if is_airtime_recorded(new_md):
|
if is_airtime_recorded(new_md):
|
||||||
hour,minute,second,name = md['MDATA_KEY_TITLE'].split("-",3)
|
hour,minute,second,name = new_md['MDATA_KEY_TITLE'].split("-",3)
|
||||||
# We assume that MDATA_KEY_YEAR is always given for airtime recorded
|
# We assume that MDATA_KEY_YEAR is always given for airtime recorded
|
||||||
# shows
|
# shows
|
||||||
new_md['MDATA_KEY_TITLE'] = u'%s-%s-%s:%s:%s' % \
|
new_md['MDATA_KEY_TITLE'] = u'%s-%s-%s:%s:%s' % \
|
||||||
|
@ -280,7 +280,7 @@ def organized_path(old_path, root_path, orig_md):
|
||||||
fname = u'%s-%s-%s.%s' % ( normal_md['MDATA_KEY_YEAR'],
|
fname = u'%s-%s-%s.%s' % ( normal_md['MDATA_KEY_YEAR'],
|
||||||
normal_md['MDATA_KEY_TITLE'],
|
normal_md['MDATA_KEY_TITLE'],
|
||||||
normal_md['MDATA_KEY_BITRATE'], ext )
|
normal_md['MDATA_KEY_BITRATE'], ext )
|
||||||
yyyy, mm, _ = normal_md['MDATA_KEY_YEAR'].split('-',3)
|
yyyy, mm, _ = normal_md['MDATA_KEY_YEAR'].split('-',2)
|
||||||
path = os.path.join(root_path, yyyy, mm)
|
path = os.path.join(root_path, yyyy, mm)
|
||||||
filepath = os.path.join(path,fname)
|
filepath = os.path.join(path,fname)
|
||||||
elif len(normal_md['MDATA_KEY_TRACKNUMBER']) == 0:
|
elif len(normal_md['MDATA_KEY_TRACKNUMBER']) == 0:
|
||||||
|
|
Loading…
Reference in New Issue