Add playlist_filenames property

Closes #21
This commit is contained in:
Hans Ole Hatzel 2017-02-13 21:41:47 +01:00 committed by jaseg
parent 87b59f8e6b
commit 60b5530942

4
mpv.py
View file

@ -512,6 +512,10 @@ class MPV(object):
def playlist_prev(self, mode='weak'):
self.command('playlist_prev', mode)
@property
def playlist_filenames(self):
return [element['filename'] for element in self.playlist]
@staticmethod
def _encode_options(options):
return ','.join('{}={}'.format(str(key), str(val)) for key, val in options.items())