Only update duration on mpv eof if file loaded

This commit is contained in:
et0h 2021-03-06 00:15:06 +00:00 committed by daniel-123
parent 5914d884da
commit 6a4ca2c938
No known key found for this signature in database
GPG Key ID: D0FED6697F1D0AC1

View File

@ -501,7 +501,7 @@ class SyncplayClient(object):
return self._globalPaused
def eofReportedByPlayer(self):
if self.playlist.notJustChangedPlaylist():
if self.playlist.notJustChangedPlaylist() and self.userlist.currentUser.file:
self.ui.showDebugMessage("Fixing file duration to allow for playlist advancement")
self.userlist.currentUser.file["duration"] = self._playerPosition