diff --git a/src/musikcore/net/WebSocketClient.cpp b/src/musikcore/net/WebSocketClient.cpp index ddb4d264c..b0d431570 100644 --- a/src/musikcore/net/WebSocketClient.cpp +++ b/src/musikcore/net/WebSocketClient.cpp @@ -133,8 +133,13 @@ WebSocketClient::WebSocketClient(IMessageQueue* messageQueue, Listener* listener auto messageId = responseJson["id"].get(); if (name == "authenticate") { this->connection = connection; + + auto prefs = Preferences::ForComponent(core::prefs::components::Settings); + auto ignoreVersionMismatch = prefs->GetInt( + core::prefs::keys::RemoteLibraryIgnoreVersionMismatch, false); + auto appVersion = responseJson["options"]["environment"]["app_version"]; - if (!appVersion.is_string() || appVersion.get() != VERSION) { + if (!ignoreVersionMismatch && (!appVersion.is_string() || appVersion.get() != VERSION)) { this->SetDisconnected(ConnectionError::IncompatibleVersion); } else { diff --git a/src/musikcore/support/PreferenceKeys.cpp b/src/musikcore/support/PreferenceKeys.cpp index d928316e0..8904f5fe1 100644 --- a/src/musikcore/support/PreferenceKeys.cpp +++ b/src/musikcore/support/PreferenceKeys.cpp @@ -79,6 +79,7 @@ namespace musik { namespace core { namespace prefs { const std::string keys::RemoteLibraryTranscoderEnabled = "RemoteLibraryTranscoderEnabled"; const std::string keys::RemoteLibraryTranscoderFormat = "RemoteLibraryTranscoderFormat"; const std::string keys::RemoteLibraryTranscoderBitrate = "RemoteLibraryTranscoderBitrate"; + const std::string keys::RemoteLibraryIgnoreVersionMismatch = "RemoteLibraryIgnoreVersionMismatch"; const std::string keys::AsyncTrackListQueries = "AsyncTrackListQueries"; } } } diff --git a/src/musikcore/support/PreferenceKeys.h b/src/musikcore/support/PreferenceKeys.h index fa265a87a..a5d532734 100644 --- a/src/musikcore/support/PreferenceKeys.h +++ b/src/musikcore/support/PreferenceKeys.h @@ -83,6 +83,7 @@ namespace musik { namespace core { namespace prefs { extern const std::string RemoteLibraryTranscoderEnabled; extern const std::string RemoteLibraryTranscoderFormat; extern const std::string RemoteLibraryTranscoderBitrate; + extern const std::string RemoteLibraryIgnoreVersionMismatch; extern const std::string AsyncTrackListQueries; } diff --git a/src/musikcube/app/layout/SettingsLayout.cpp b/src/musikcube/app/layout/SettingsLayout.cpp index 364a8ba6f..c6623820e 100755 --- a/src/musikcube/app/layout/SettingsLayout.cpp +++ b/src/musikcube/app/layout/SettingsLayout.cpp @@ -119,6 +119,7 @@ static inline std::shared_ptr AdvancedSettingsSchema() { #endif schema->AddBool(cube::prefs::keys::AutoHideCommandBar, false); schema->AddInt(core::prefs::keys::RemoteLibraryLatencyTimeoutMs, 5000); + schema->AddBool(core::prefs::keys::RemoteLibraryIgnoreVersionMismatch, false); schema->AddInt(core::prefs::keys::PlaybackTrackQueryTimeoutMs, 5000); schema->AddBool(core::prefs::keys::AsyncTrackListQueries, true); schema->AddBool(cube::prefs::keys::DisableRatingColumn, false);