Skip to content

Commit 20a70ab

Browse files
committed
mpvplayer: add file_duration property
1 parent 7beda46 commit 20a70ab

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

blitzloop/mpvplayer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ def load_song(self, song):
134134
if "duration" in song.song:
135135
self.duration = float(song.song["duration"])
136136

137+
self.file_duration = self._getprop("length")
138+
137139
ch = self._getprop("audio-params/channel-count")
138140
assert ch == 1 or (ch % 2 == 0)
139141
self.channels = ((ch + 1) // 2) - 1

0 commit comments

Comments
 (0)