CC-3155: Show doesn't resume playback on system crash / restarting pypo
-fixed
This commit is contained in:
parent
47d139dfcd
commit
b8e1884583
|
@ -314,7 +314,7 @@ class PypoFetch(Thread):
|
||||||
|
|
||||||
ls_playlist = []
|
ls_playlist = []
|
||||||
|
|
||||||
dtnow = datetime.today()
|
dtnow = datetime.utcnow()
|
||||||
str_tnow_s = dtnow.strftime('%Y-%m-%d-%H-%M-%S')
|
str_tnow_s = dtnow.strftime('%Y-%m-%d-%H-%M-%S')
|
||||||
|
|
||||||
sortedKeys = sorted(playlist['medias'].iterkeys())
|
sortedKeys = sorted(playlist['medias'].iterkeys())
|
||||||
|
@ -333,7 +333,7 @@ class PypoFetch(Thread):
|
||||||
#song is currently playing and we just started pypo. Maybe there
|
#song is currently playing and we just started pypo. Maybe there
|
||||||
#was a power outage? Let's restart playback of this song.
|
#was a power outage? Let's restart playback of this song.
|
||||||
start_split = map(int, start.split('-'))
|
start_split = map(int, start.split('-'))
|
||||||
media_start = datetime(start_split[0], start_split[1], start_split[2], start_split[3], start_split[4], start_split[5])
|
media_start = datetime(start_split[0], start_split[1], start_split[2], start_split[3], start_split[4], start_split[5], 0, None)
|
||||||
logger.debug("Found media item that started at %s.", media_start)
|
logger.debug("Found media item that started at %s.", media_start)
|
||||||
|
|
||||||
delta = dtnow - media_start #we get a TimeDelta object from this operation
|
delta = dtnow - media_start #we get a TimeDelta object from this operation
|
||||||
|
|
Loading…
Reference in New Issue