CC-4043: Pypo: add same song twice and cancel the first song, the

following song wont play any more

- fixed
This commit is contained in:
James 2012-06-29 12:11:38 -04:00
parent 0b069c2f54
commit e5e0c925e6
2 changed files with 5 additions and 1 deletions

View file

@ -60,10 +60,14 @@ class PypoFile(Thread):
except Exception, e:
dst_exists = False
media_item['already_exist'] = False
do_copy = False
if dst_exists:
if src_size != dst_size:
do_copy = True
else:
self.logger.debug("file %s already exists in local cache as %s, skipping cpoying..." % (src, dst))
media_item['already_exist'] = True
else:
do_copy = True

View file

@ -344,7 +344,7 @@ class PypoPush(Thread):
time.sleep(0.1)
iter_num += 1
if media_item['started_copying']:
if media_item['started_copying'] or media_item['already_exist']:
self.telnet_to_liquidsoap(media_item)
else:
self.logger.warn("File %s did not become ready in less than 5 seconds. Skipping...", media_item['dst'])