diff --git a/core/src/websocket.cpp b/core/src/websocket.cpp index b616ddc..bc7a99f 100644 --- a/core/src/websocket.cpp +++ b/core/src/websocket.cpp @@ -44,7 +44,10 @@ WebSocket::WebSocket(ApiClient *client) connect(client, &ApiClient::authenticatedChanged, this, [this](bool isAuthenticated) { if (isAuthenticated) { this->m_reconnectAttempt = 0; - this->open(); + // https://github.com/heartfin/harbour-sailfin/issues/16 + // Opening a websocket just afther the authentication may cause the application to freeze + // Therefore, we delay the initialisation :) + QTimer::singleShot(5'000, this, &WebSocket::open); } }); } diff --git a/sailfish/qml/harbour-sailfin.qml b/sailfish/qml/harbour-sailfin.qml index e11fc55..624c163 100644 --- a/sailfish/qml/harbour-sailfin.qml +++ b/sailfish/qml/harbour-sailfin.qml @@ -182,27 +182,12 @@ ApplicationWindow { onAuthenticatedChanged: { if (authenticated && !isInSetup()) { console.log("Authenticated)") - loginAnimation.start() - //pageStack.replace(Qt.resolvedUrl("pages/MainPage.qml")) + //loginAnimation.start() + pageStack.replace(Qt.resolvedUrl("pages/MainPage.qml")) } } } - // Delaying the creation of the MainPage prevents the application from freezing - // if connecting to the server over HTTPS - // TODO: figure out why the application actually freezes and remove this workaround - SequentialAnimation { - id: loginAnimation - - PauseAnimation { - duration: 250 - } - - ScriptAction { - script: pageStack.replace(Qt.resolvedUrl("pages/MainPage.qml"), {}, PageStackAction.Immediate) - } - } - function isInSetup() { return pageStack.find(function (page) { return typeof page._isSetupPage !== "undefined" }) !== null } diff --git a/sailfish/translations/harbour-sailfin-de.ts b/sailfish/translations/harbour-sailfin-de.ts index 9378f91..310217a 100644 --- a/sailfish/translations/harbour-sailfin-de.ts +++ b/sailfish/translations/harbour-sailfin-de.ts @@ -115,6 +115,19 @@ + + ControllableDevicesPage + + Remote control + Page title: page for remote controlling other Jellyfin apps + + + + %1 — %2 + List of devices item title in the form of <app name> — <device name> + + + CoverPage @@ -277,6 +290,11 @@ Pull down to retry again + + Remote control + Pulley menu item: shows controllable device page + + MusicAlbumPage @@ -375,14 +393,6 @@ Page title for the list of all artists within the music library PlaybackBar - - No media selected - - - - Play some media! - - No audio @@ -396,6 +406,20 @@ Page title for the list of all artists within the music library Pulley menu item: stops playback of music + + Nothing is playing + Shown in a bright font when no media is playing in the bottom bar and now playing screen + + + + Connected to %1 + Shown when no media is being played, but the app is controlling another Jellyfin client %1 is the name of said client + + + + Start playing some media! + + PosterCover diff --git a/sailfish/translations/harbour-sailfin-ru.ts b/sailfish/translations/harbour-sailfin-ru.ts index 1b15949..466169c 100644 --- a/sailfish/translations/harbour-sailfin-ru.ts +++ b/sailfish/translations/harbour-sailfin-ru.ts @@ -19,6 +19,10 @@ <p><b>Sailfin version %1</b><br/>Copyright © Chris Josten 2020–%2</p><p>Sailfin is Free Software licensed under the <a href='lgpl'>LGPL-v2.1</a> or later, at your choice. Parts of the code of Sailfin are from other libraries. <a href='3rdparty'>View their licenses here</a>.</p> + + LGPL 2.1 License + + AddServerConnectingPage @@ -115,6 +119,19 @@ + + ControllableDevicesPage + + Remote control + Page title: page for remote controlling other Jellyfin apps + + + + %1 — %2 + List of devices item title in the form of <app name> — <device name> + + + DebugPage @@ -255,6 +272,11 @@ Pulley menu item: reload items on page Обновить + + Remote control + Pulley menu item: shows controllable device page + + MusicAlbumPage @@ -357,11 +379,11 @@ Page title for the list of all artists within the music library PlaybackBar No media selected - Ничего не выбрано + Ничего не выбрано Play some media! - Начните что-то проигрывать! + Начните что-то проигрывать! No audio @@ -376,6 +398,20 @@ Page title for the list of all artists within the music library Pulley menu item: stops playback of music Стоп + + Nothing is playing + Shown in a bright font when no media is playing in the bottom bar and now playing screen + + + + Connected to %1 + Shown when no media is being played, but the app is controlling another Jellyfin client %1 is the name of said client + + + + Start playing some media! + + PosterCover @@ -518,7 +554,7 @@ This is still an alpha version :) Network error Video playback error: network error - + Ошибка сети Access denied @@ -533,7 +569,7 @@ This is still an alpha version :) Retry Button to retry loading a video after a failure - + Попробовать снова No error diff --git a/sailfish/translations/harbour-sailfin.ts b/sailfish/translations/harbour-sailfin.ts index 5da9dc4..c41fcb0 100644 --- a/sailfish/translations/harbour-sailfin.ts +++ b/sailfish/translations/harbour-sailfin.ts @@ -115,6 +115,19 @@ + + ControllableDevicesPage + + Remote control + Page title: page for remote controlling other Jellyfin apps + + + + %1 — %2 + List of devices item title in the form of <app name> — <device name> + + + DebugPage @@ -255,6 +268,11 @@ Pull down to retry again + + Remote control + Pulley menu item: shows controllable device page + + MusicAlbumPage @@ -353,14 +371,6 @@ Page title for the list of all artists within the music library PlaybackBar - - No media selected - - - - Play some media! - - No audio @@ -374,6 +384,20 @@ Page title for the list of all artists within the music library Pulley menu item: stops playback of music + + Nothing is playing + Shown in a bright font when no media is playing in the bottom bar and now playing screen + + + + Connected to %1 + Shown when no media is being played, but the app is controlling another Jellyfin client %1 is the name of said client + + + + Start playing some media! + + PosterCover