From 60b5530942a663ca9b3e26edf0a1e82b730aa6a5 Mon Sep 17 00:00:00 2001 From: Hans Ole Hatzel Date: Mon, 13 Feb 2017 21:41:47 +0100 Subject: Add playlist_filenames property Closes #21 --- mpv.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mpv.py b/mpv.py index 6737ee1..63986e1 100644 --- a/mpv.py +++ b/mpv.py @@ -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()) -- cgit