mirror of
https://github.com/Syncplay/syncplay
synced 2024-12-14 19:04:57 +00:00
Rewind video when manually changing playlist selection (#138)
This commit is contained in:
parent
ad68e98027
commit
846d7f7536
@ -577,9 +577,9 @@ class MainWindow(QtWidgets.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'),
|
||||
@ -697,11 +697,11 @@ class MainWindow(QtWidgets.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))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user