From d7bd0df62f15cc996db60cc573a68ca3f1967024 Mon Sep 17 00:00:00 2001 From: Etoh Date: Sat, 14 Oct 2017 16:03:13 +0100 Subject: [PATCH] Rewind video when manually changing playlist selection (#138) --- syncplay/ui/gui.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/syncplay/ui/gui.py b/syncplay/ui/gui.py index 1a1f023..8e83624 100644 --- a/syncplay/ui/gui.py +++ b/syncplay/ui/gui.py @@ -521,9 +521,9 @@ class MainWindow(QtGui.QMainWindow): pathFound = self._syncplayClient.fileSwitch.findFilepath(firstFile) if not isURL(firstFile) else None if self._syncplayClient.userlist.currentUser.file is None or firstFile <> self._syncplayClient.userlist.currentUser.file["name"]: if isURL(firstFile): - menu.addAction(QtGui.QPixmap(resourcespath + u"world_go.png"), getMessage("openstreamurl-menu-label"), lambda: self.openFile(firstFile)) + menu.addAction(QtGui.QPixmap(resourcespath + u"world_go.png"), getMessage("openstreamurl-menu-label"), lambda: self.openFile(firstFile,resetPosition=True)) elif pathFound: - menu.addAction(QtGui.QPixmap(resourcespath + u"film_go.png"), getMessage("openmedia-menu-label"), lambda: self.openFile(pathFound)) + menu.addAction(QtGui.QPixmap(resourcespath + u"film_go.png"), getMessage("openmedia-menu-label"), lambda: self.openFile(pathFound,resetPosition=True)) if pathFound: menu.addAction(QtGui.QPixmap(resourcespath + u"folder_film.png"), getMessage('open-containing-folder'), @@ -632,11 +632,11 @@ class MainWindow(QtGui.QMainWindow): if self._isTryingToChangeToCurrentFile(filename): return if isURL(filename): - self._syncplayClient._player.openFile(filename) + self._syncplayClient._player.openFile(filename, resetPosition=True) else: pathFound = self._syncplayClient.fileSwitch.findFilepath(filename, highPriority=True) if pathFound: - self._syncplayClient._player.openFile(pathFound) + self._syncplayClient._player.openFile(pathFound, resetPosition=True) else: self._syncplayClient.ui.showErrorMessage(getMessage("cannot-find-file-for-playlist-switch-error").format(filename))