diff --git a/syncplay/__init__.py b/syncplay/__init__.py index 0ab7cb8..31a5492 100644 --- a/syncplay/__init__.py +++ b/syncplay/__init__.py @@ -1,4 +1,4 @@ version = '1.4.0' milestone = 'Yoitsu' -release_number = '27' +release_number = '28' projectURL = 'http://syncplay.pl/' diff --git a/syncplay/client.py b/syncplay/client.py index 0443712..43f2064 100644 --- a/syncplay/client.py +++ b/syncplay/client.py @@ -510,6 +510,11 @@ class SyncplayClient(object): def setServerVersion(self, version): self.serverVersion = version + self.checkForFeatureSupport() + + def checkForFeatureSupport(self): + if not utils.meetsMinVersion(self.serverVersion, constants.SHARED_PLAYLIST_MIN_VERSION): + self.ui.showErrorMessage(getMessage("shared-playlists-not-supported-by-server-error").format(constants.SHARED_PLAYLIST_MIN_VERSION, self.serverVersion)) def getSanitizedCurrentUserFile(self): if self.userlist.currentUser.file: diff --git a/syncplay/constants.py b/syncplay/constants.py index b92b56b..135ebe4 100644 --- a/syncplay/constants.py +++ b/syncplay/constants.py @@ -77,6 +77,7 @@ VLC_LATENCY_ERROR_THRESHOLD = 2.0 MPV_UNRESPONSIVE_THRESHOLD = 60.0 CONTROLLED_ROOMS_MIN_VERSION = "1.3.0" USER_READY_MIN_VERSION = "1.3.0" +SHARED_PLAYLIST_MIN_VERSION = "1.4.0" MPC_PATHS = [ r"c:\program files (x86)\mpc-hc\mpc-hc.exe", r"c:\program files\mpc-hc\mpc-hc.exe", diff --git a/syncplay/messages_de.py b/syncplay/messages_de.py index 38bf60f..af15c15 100644 --- a/syncplay/messages_de.py +++ b/syncplay/messages_de.py @@ -134,6 +134,7 @@ de = { "vlc-failed-other" : u"Beim Laden des syncplay.lua Interface-Skripts durch VLC trat folgender Fehler auf: {}", # Syncplay Error "not-supported-by-server-error" : u"Dieses Feature wird vom Server nicht unterstützt. Es wird ein Server mit Syncplay Version {}+ benötigt, aktuell verwendet wird jedoch Version {}.", #minVersion, serverVersion + "shared-playlists-not-supported-by-server-error" : "The shared playlists feature may not be supported by the server. To ensure that it works correctly requires a server running Syncplay {}+, but the server is running Syncplay {}.", #minVersion, serverVersion # TODO: Translate "invalid-seek-value" : u"Ungültige Zeitangabe", "invalid-offset-value" : u"Ungültiger Offset-Wert", diff --git a/syncplay/messages_en.py b/syncplay/messages_en.py index ccf49ce..e3bd6dc 100644 --- a/syncplay/messages_en.py +++ b/syncplay/messages_en.py @@ -134,6 +134,7 @@ en = { "vlc-failed-other" : "When trying to load the syncplay.lua interface script VLC has provided the following error: {}", # Syncplay Error "not-supported-by-server-error" : "This feature is not supported by the server. The feature requires a server running Syncplay {}+, but the server is running Syncplay {}.", #minVersion, serverVersion + "shared-playlists-not-supported-by-server-error" : "The shared playlists feature may not be supported by the server. To ensure that it works correctly requires a server running Syncplay {}+, but the server is running Syncplay {}.", #minVersion, serverVersion "invalid-seek-value" : u"Invalid seek value", "invalid-offset-value" : u"Invalid offset value", diff --git a/syncplay/messages_ru.py b/syncplay/messages_ru.py index 30e2a66..6381543 100644 --- a/syncplay/messages_ru.py +++ b/syncplay/messages_ru.py @@ -134,6 +134,7 @@ ru = { "vlc-failed-other" : u"Во время загрузки скрипта интерфейса syncplay.lua в VLC произошла следующая ошибка: {}", # Syncplay Error "not-supported-by-server-error" : u"Эта возможность не поддерживается сервером. The feature requires a server running Syncplay {}+, but the server is running Syncplay {}.", #minVersion, serverVersion #TODO: Translate into Russian + "shared-playlists-not-supported-by-server-error" : "The shared playlists feature may not be supported by the server. To ensure that it works correctly requires a server running Syncplay {}+, but the server is running Syncplay {}.", #minVersion, serverVersion # TODO: Translate "invalid-seek-value" : u"Некорректное значение для перемотки", "invalid-offset-value" : u"Некорректное смещение",