Fix #788 mpris_listener playback position lost on VLC quit

Thanks @coffee-lord for the solution
This commit is contained in:
Eric Le Lay 2020-04-26 16:29:16 +02:00
parent 1d5c2c028e
commit 009833a809

View file

@ -272,6 +272,8 @@ class MPRISDBusReceiver(object):
collected_info['length'] = changed_properties['Metadata'].get('mpris:length', 0.0)
if 'Rate' in changed_properties:
collected_info['rate'] = changed_properties['Rate']
# Fix #788 pos=0 when Stopped resulting in not saving position on VLC quit
if changed_properties.get('PlaybackStatus') != 'Stopped':
collected_info['pos'] = self.query_position(sender)
if 'status' not in collected_info: