Double click switch file: Add errors, tidy code, don't get path if no file open, upver to 12
This commit is contained in:
parent
f41cb535df
commit
763829a00e
@ -1,4 +1,4 @@
|
||||
version = '1.3.1'
|
||||
milestone = 'Chami'
|
||||
release_number = '11'
|
||||
release_number = '12'
|
||||
projectURL = 'http://syncplay.pl/'
|
||||
|
||||
@ -134,6 +134,9 @@ en = {
|
||||
"invalid-seek-value" : u"Invalid seek value",
|
||||
"invalid-offset-value" : u"Invalid offset value",
|
||||
|
||||
"switch-file-not-found-error" : u"Could not switch to file '{0}' as it was not found in folder '{1}'.", # File not found, folder it was not found in
|
||||
"switch-no-folder-error" : u"Could not switch to file '{0}'. Syncplay only looks in the folder of the currently playing file, and no file is currently playing.", # File not found
|
||||
|
||||
# Client arguments
|
||||
"argument-description" : 'Solution to synchronize playback of multiple MPlayer and MPC-HC instances over the network.',
|
||||
"argument-epilog" : 'If no options supplied _config values will be used',
|
||||
@ -489,6 +492,9 @@ ru = {
|
||||
"invalid-seek-value" : u"Invalid seek value", # TODO: Translate into Russian
|
||||
"invalid-offset-value" : u"Invalid offset value", # TODO: Translate into Russian
|
||||
|
||||
"switch-file-not-found-error" : u"Could not switch to file '{0}' as it was not found in folder '{1}'.", # File not found, folder it was not found in # TODO: Translate into Russian
|
||||
"switch-no-folder-error" : u"Could not switch to file '{0}'. Syncplay only looks in the folder of the currently playing file, and no file is currently playing.", # File not found # TODO: Translate into Russian
|
||||
|
||||
# Client arguments
|
||||
"argument-description" : u'Решение для синхронного воспроизведения в VLC, MPlayer или MPC-HC через Интернет.',
|
||||
"argument-epilog" : u'Если параметр не будет передан, то будет использоваться значение, указанное в _config.',
|
||||
@ -844,6 +850,9 @@ de = {
|
||||
"invalid-seek-value" : u"Ungültige Zeitangabe",
|
||||
"invalid-offset-value" : u"Ungültiger Offset-Wert",
|
||||
|
||||
"switch-file-not-found-error" : u"Could not switch to file '{0}' as it was not found in folder '{1}'.", # File not found, folder it was not found in # TODO: Translate into German
|
||||
"switch-no-folder-error" : u"Could not switch to file '{0}'. Syncplay only looks in the folder of the currently playing file, and no file is currently playing.", # File not found # TODO: Translate into German
|
||||
|
||||
# Client arguments
|
||||
"argument-description" : u'Syncplay ist eine Anwendung um mehrere MPlayer, MPC-HC und VLC-Instanzen über das Internet zu synchronisieren.',
|
||||
"argument-epilog" : u'Wenn keine Optionen angegeben sind, werden die _config-Werte verwendet',
|
||||
|
||||
@ -241,17 +241,18 @@ class MainWindow(QtGui.QMainWindow):
|
||||
if self._syncplayClient.userlist.currentUser.file and filename == self._syncplayClient.userlist.currentUser.file:
|
||||
return
|
||||
if isURL(filename):
|
||||
self._syncplayClient._player.openFile(filename) #bob
|
||||
self._syncplayClient._player.openFile(filename)
|
||||
else:
|
||||
currentPath = self._syncplayClient.userlist.currentUser.file["path"]
|
||||
if currentPath is not None:
|
||||
currentPath = self._syncplayClient.userlist.currentUser.file["path"] if self._syncplayClient.userlist.currentUser.file else None
|
||||
if currentPath:
|
||||
currentDirectory = os.path.dirname(currentPath)
|
||||
newPath = os.path.join(currentDirectory, filename)
|
||||
if os.path.isfile(newPath):
|
||||
self._syncplayClient._player.openFile(newPath)
|
||||
# TODO: Add error messages
|
||||
# TODO: Change media players (mpv/VLC) to give URL of stream
|
||||
|
||||
else:
|
||||
self.showErrorMessage(getMessage("switch-file-not-found-error").format(filename, currentDirectory))
|
||||
else:
|
||||
self.showErrorMessage(getMessage("switch-no-folder-error").format(filename))
|
||||
|
||||
@needsClient
|
||||
def userListChange(self):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user