diff options
author | Hans Ole Hatzel <hhatzel@gmail.com> | 2017-02-13 21:41:47 +0100 |
---|---|---|
committer | jaseg <git@jaseg.net> | 2017-05-06 12:42:41 +0200 |
commit | 60b5530942a663ca9b3e26edf0a1e82b730aa6a5 (patch) | |
tree | b193f05040dcb251866ce53ce67dc57af9be4385 /mpv.py | |
parent | 87b59f8e6b9d8230ca3b2bdccf352b4621c28e8e (diff) | |
download | python-mpv-60b5530942a663ca9b3e26edf0a1e82b730aa6a5.tar.gz python-mpv-60b5530942a663ca9b3e26edf0a1e82b730aa6a5.tar.bz2 python-mpv-60b5530942a663ca9b3e26edf0a1e82b730aa6a5.zip |
Add playlist_filenames property
Closes #21
Diffstat (limited to 'mpv.py')
-rw-r--r-- | mpv.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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()) |