Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Oct 11, 2024
2 parents 8b407fa + 3f87389 commit 65a0383
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 19 deletions.
29 changes: 16 additions & 13 deletions src/components/ConnectionRequired.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,19 +149,22 @@ const ConnectionRequired: FunctionComponent<ConnectionRequiredProps> = ({

useEffect(() => {
// Check connection status on initial page load
ServerConnections.connect()
.then(firstConnection => {
console.debug('[ConnectionRequired] connection state', firstConnection?.State);

if (firstConnection && firstConnection.State !== ConnectionState.SignedIn) {
return handleIncompleteWizard(firstConnection);
} else {
return validateUserAccess();
}
})
.catch(err => {
console.error('[ConnectionRequired] failed to connect to server', err);
});
const apiClient = ServerConnections.currentApiClient();
const firstConnection = ServerConnections.firstConnection;
console.debug('[ConnectionRequired] connection state', firstConnection?.State);
ServerConnections.firstConnection = null;

if (firstConnection && firstConnection.State !== ConnectionState.SignedIn && !apiClient?.isLoggedIn()) {
handleIncompleteWizard(firstConnection)
.catch(err => {
console.error('[ConnectionRequired] could not start wizard', err);
});
} else {
validateUserAccess()
.catch(err => {
console.error('[ConnectionRequired] could not validate user access', err);
});
}
}, [handleIncompleteWizard, validateUserAccess]);

if (isLoading) {
Expand Down
1 change: 1 addition & 0 deletions src/components/ServerConnections.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class ServerConnections extends ConnectionManager {
constructor() {
super(...arguments);
this.localApiClient = null;
this.firstConnection = null;

// Set the apiclient minimum version to match the SDK
this._minServerVersion = MINIMUM_VERSION;
Expand Down
3 changes: 3 additions & 0 deletions src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ build: ${__JF_BUILD_VERSION__}`);
Events.on(apiClient, 'requestfail', appRouter.onRequestFail);
});

// Connect to server
ServerConnections.firstConnection = await ServerConnections.connect();

// Render the app
await renderApp();

Expand Down
6 changes: 4 additions & 2 deletions src/strings/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"BoxRear": "Box (Rückseite)",
"Browse": "Durchsuchen",
"MessageBrowsePluginCatalog": "Durchsuche unseren Katalog, um alle verfügbaren Plugins anzuzeigen.",
"BurnSubtitlesHelp": "Legt fest, ob der Server die Untertitel während der Videotranskodierung einbrennen soll. Deaktivieren verbessert die Serverperformance immens. Wähle Auto, um bildbasierte Formate (z.B. VobSub, PGS, SUB, IDX, etc.) sowie bestimmte ASS- oder SSA-Untertitel einbrennen zu lassen.",
"BurnSubtitlesHelp": "Legt fest, ob der Server die Untertitel einbrennen soll. Deaktivieren verbessert die Serverperformance immens. Wähle Auto, um bildbasierte Formate (z.B. VobSub, PGS, SUB, IDX, etc.) sowie bestimmte ASS- oder SSA-Untertitel einbrennen zu lassen.",
"ButtonAddMediaLibrary": "Medienbibliothek hinzufügen",
"ButtonAddScheduledTaskTrigger": "Auslöser hinzufügen",
"ButtonAddServer": "Server hinzufügen",
Expand Down Expand Up @@ -1963,5 +1963,7 @@
"UseCustomTagDelimitersHelp": "Trennen Sie Künstler-/Genre-Tags mit benutzerdefinierten Zeichen.",
"LabelCustomTagDelimiters": "Benutzerdefinierte Tag-Begrenzung",
"LabelDelimiterWhitelist": "Trennzeichen Whitelist",
"UseCustomTagDelimiters": "Benutzerdefinierte Tag-Begrenzung verwenden"
"UseCustomTagDelimiters": "Benutzerdefinierte Tag-Begrenzung verwenden",
"DateModified": "Datum verändert",
"AlwaysBurnInSubtitleWhenTranscoding": "Beim Transkodieren immer Untertitel einbrennen"
}
2 changes: 1 addition & 1 deletion src/strings/en-us.json
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@
"LabelPublicHttpsPort": "Public HTTPS port number",
"LabelPublicHttpsPortHelp": "The public port number that should be mapped to the local HTTPS port.",
"LabelPublishedServerUri": "Published Server URIs",
"LabelPublishedServerUriHelp": "Override the URI used by Jellyfin, based on the interface, or client IP address.",
"LabelPublishedServerUriHelp": "Override the URI used by Jellyfin, based on the interface, or client IP address. For example: internal=http://jellyfin.example.com, external=https://jellyfin.example.com, or all=https://jellyfin.example.com",
"LabelQuickConnectCode": "Quick Connect code",
"LabelReasonForTranscoding": "Reason for transcoding",
"LabelRecord": "Record",
Expand Down
4 changes: 2 additions & 2 deletions src/strings/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -1459,7 +1459,7 @@
"LabelUDPPortRange": "UDP-communicatiebereik",
"LabelSSDPTracingFilterHelp": "Optioneel IP-adres waarop het geregistreerde SSDP-verkeer wordt gefilterd.",
"LabelSSDPTracingFilter": "SSDP-filter",
"LabelPublishedServerUriHelp": "Overschrijf de URI die door Jellyfin wordt gebruikt, op basis van de interface of het IP-adres van de client.",
"LabelPublishedServerUriHelp": "Overschrijf de URI die door Jellyfin wordt gebruikt, op basis van de interface of het IP-adres van de client. Bijvoorbeeld: internal=http://jellyfin.example.com, external=https://jellyfin.example.com, of all=https://jellyfin.example.com",
"LabelPublishedServerUri": "Gepubliceerde server-URI's",
"LabelIsForced": "Geforceerd",
"LabelHDHomerunPortRangeHelp": "Beperkt het UDP-poortbereik van HDHomeRun tot deze waarde. (Standaard is 1024 - 65535).",
Expand Down Expand Up @@ -1895,7 +1895,7 @@
"LabelSelectPreferredTranscodeVideoAudioCodec": "Gewenste geluidscodec bij afspelen video",
"SelectPreferredTranscodeVideoAudioCodecHelp": "Selecteer de gewenste geluidscodec om naartoe te transcoderen bij video-inhoud. Als de voorkeurscodec niet wordt ondersteund, gebruikt de server de beste codec die wel beschikbaar is.",
"Alternate": "Alternatief",
"AlternateDVD": "Alternatief dvd",
"AlternateDVD": "Alternatieve dvd",
"Regional": "Regionaal",
"LabelSelectPreferredTranscodeVideoCodec": "Gewenste beeldcodec voor transcoderen",
"SelectPreferredTranscodeVideoCodecHelp": "Selecteer de gewenste beeldcodec om naartoe te transcoderen. Als de voorkeurscodec niet wordt ondersteund, gebruikt de server de beste codec die wel beschikbaar is.",
Expand Down
2 changes: 1 addition & 1 deletion src/strings/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -1422,7 +1422,7 @@
"QuickConnectAuthorizeFail": "Nieznany kod szybkiego łączenia",
"QuickConnect": "Szybkie łączenie",
"LabelQuickConnectCode": "Kod szybkiego łączenia",
"LabelPublishedServerUriHelp": "Nadpisz URI używane przez Jellyfin bazując na interfejsie lub adresie IP klienta.",
"LabelPublishedServerUriHelp": "Zastąp URI używany przez Jellyfin na podstawie interfejsu lub adresu IP klienta. Na przykład: internal=http://jellyfin.example.com, external=https://jellyfin.example.comm lub all=https://jellyfin.example.com",
"LabelPublishedServerUri": "Publiczne URI serwera",
"LabelMinAudiobookResumeHelp": "Tytuły są uważane za nieodtworzone jeśli zostały zatrzymane przed tym czasem.",
"LabelMinAudiobookResume": "Minimalne wznowienie audiobooka w minutach",
Expand Down

0 comments on commit 65a0383

Please sign in to comment.