Allow running JMP with no bundled webclient!

This commit is contained in:
Ian Walton 2023-03-10 00:21:23 -05:00
parent 9ee3cb4264
commit 2450ae1956
17 changed files with 885 additions and 28 deletions

View File

@ -45,7 +45,6 @@ set_policy(CMP0026 OLD)
include(utils)
include(CompilerFlags)
include(WebClient)
include(DependencyConfiguration)
include(QtConfiguration)
include(VersionConfiguration)

View File

@ -1,11 +0,0 @@
include(FetchDependencies)
option(WEB_CLIENT_DISABLE_DESKTOP "" OFF)
# This is the line to edit when you bump the web-client.
set(WEB_CLIENT_BUILD_ID jwc-1.7.0)
message(STATUS ${BUILDIDS})
# TODO make this actually work

View File

@ -11,7 +11,8 @@ Downloads:
- [Flathub (Linux)](https://flathub.org/apps/details/com.github.iwalton3.jellyfin-media-player)
Related Documents:
- Corresponding web client: [Repo](https://github.com/iwalton3/jellyfin-web-jmp/) [Release](https://github.com/iwalton3/jellyfin-web-jmp/releases/)
- Web client: https://repo.jellyfin.org/releases/server/portable/versions/stable/web/
- Note: If you do not provide the web client, the application will use a fallback UI where the user must select a server which has a web client.
- API Docs in [client-api.md](https://github.com/iwalton3/jellyfin-media-player/blob/master/client-api.md)
- Tip: For help building, look at the GitHub Actions file!

15
debian-webclient-rules Executable file
View File

@ -0,0 +1,15 @@
#! /usr/bin/make -f
%:
dh $@
override_dh_auto_configure:
DOWNLOAD_ONLY=1 ./download_webclient.sh
tar -xzf dist.tar.gz
mkdir obj-x86_64-linux-gnu
mv jellyfin-web_* obj-x86_64-linux-gnu/dist
dh_auto_configure $@
override_dh_auto_clean:
dh_auto_clean $@
rm dist.tar.gz || true

2
debian/control vendored
View File

@ -2,7 +2,7 @@ Source: jellyfin-media-player
Section: video
Priority: optional
Maintainer: Ian Walton <ian@iwalton.com>, Joshua Boniface <joshua@boniface.me>
Build-Depends: debhelper (>= 9),
Build-Depends: debhelper (>= 10),
autoconf,
automake,
libtool,

12
debian/rules vendored
View File

@ -1,14 +1,4 @@
#! /usr/bin/make -f
%:
dh $@
override_dh_auto_build:
dh_auto_build $@
DOWNLOAD_ONLY=1 ./download_webclient.sh
tar -xzf dist.tar.gz
mv jellyfin-web_* obj-x86_64-linux-gnu/dist
override_dh_auto_clean:
dh_auto_clean $@
rm dist.tar.gz || true
dh $@

View File

@ -5,6 +5,7 @@ set -o xtrace
# move to source directory
pushd ${SOURCE_DIR}
cp debian-webclient-rules ./debian/rules
# install deps
echo y | mk-build-deps -i

95
native/find-webclient.css Normal file
View File

@ -0,0 +1,95 @@
* {
box-sizing: border-box;
}
body {
background-color: #101010;
color: #fff;
font-family: sans-serif;
font-size: 1.2em;
padding: 1em;
}
.logo {
max-width: 500px;
margin-bottom: 1em;
margin-left: auto;
margin-right: auto;
display: block;
}
input[type=text] {
display: block;
width: 100%;
font-size: 1em;
background-color: #292929;
color: #fff;
border: 2px solid #292929;
border-radius: 0.2em;
padding: 0.5em;
}
input[type=text]:focus {
border: 2px solid #00a4dc;
border-radius: 0.2em;
outline: none;
}
button {
width: 100%;
color: #fff;
background-color: #00a4dc;
border: none;
border-radius: 0.2em;
font-size: 1em;
padding: 0.5em;
cursor: pointer;
}
button:disabled {
background-color: #292929;
cursor: default;
}
#address-label {
display: block;
margin-bottom: 0.5em;
}
#main {
max-width: 1000px;
margin-top: 3rem;
margin-left: auto;
margin-right: auto;
display: none;
}
#splash {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
display: flex;
flex-direction: column;
justify-content: center;
}
#backdrop {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
z-index: 99;
display: none;
}
#connect-fail {
text-align: center;
background-color: #101010;
max-width: 600px;
padding: 25px;
margin-top: calc(50vh - 100px);
margin-left: auto;
margin-right: auto;
opacity: 1;
}
#connect-fail h1 {
font-size: 1.5em;
margin-top: 0;
}
#helper-text {
margin-top: 0.3em;
}

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Jellyfin Media Player</title>
<link rel="stylesheet" href="find-webclient.css">
</head>
<body>
<div id="splash">
<img class="logo" src="logo.svg">
</div>
<div id="main">
<img class="logo" src="logo.svg">
<h1 id="title"></h1>
<form id="connect-form">
<label for="address" id="address-label"></label>
<input type="text" id="address" autofocus>
<p id="helper-text"></p>
<button id="connect-button" type="submit"></button>
</form>
</div>
<div id="backdrop">
<div id="connect-fail">
<h1 id="connect-fail-title"></h1>
<p id="connect-fail-text"></p>
<button id="connect-fail-button"></button>
</div>
</div>
<script src="find-webclient.lang.js"></script>
<script src="find-webclient.js"></script>
</html>

77
native/find-webclient.js Normal file
View File

@ -0,0 +1,77 @@
async function tryConnect(server) {
document.getElementById('connect-button').disabled = true;
try {
if (!server.startsWith("http")) {
server = "http://" + server;
}
const url = new URL("/System/Info/Public", server);
const response = await fetch(url);
if (response.ok && (await response.json()).Id) {
const htmlResponse = await fetch(server);
if (!htmlResponse.ok) {
throw new Error("Status not ok");
}
// Sigh... If we just navigate to the URL, the server's CSP will block us loading other resources.
// So we have to parse the HTML, set a new base href, and then write it back to the page.
// We also have to override the history functions to make sure they use the correct URL.
const webUrl = htmlResponse.url.replace(/\/[^\/]*$/, "/");
const realUrl = window.location.href;
const html = await htmlResponse.text();
const parser = new DOMParser();
const doc = parser.parseFromString(html, "text/html");
const base = doc.createElement("base");
base.href = webUrl
doc.head.insertBefore(base, doc.head.firstChild);
const oldPushState = window.history.pushState;
window.history.pushState = function(state, title, url) {
url = (new URL(url, realUrl)).toString();
return oldPushState.call(window.history, state, title, url);
};
const oldReplaceState = window.history.replaceState;
window.history.replaceState = function(state, title, url) {
url = (new URL(url, realUrl)).toString();
return oldReplaceState.call(window.history, state, title, url);
};
document.open();
document.write((new XMLSerializer()).serializeToString(doc));
document.close();
window.localStorage.setItem("saved-server", server);
return true;
}
} catch (e) {
console.error(e);
document.getElementById('connect-button').disabled = false;
return false;
}
}
document.getElementById('connect-form').addEventListener('submit', async (e) => {
e.preventDefault();
const server = document.getElementById('address').value;
const result = await tryConnect(server);
if (!result) {
document.getElementById('backdrop').style.display = 'block';
}
});
document.getElementById('connect-fail-button').addEventListener('click', () => {
document.getElementById('backdrop').style.display = 'none';
});
const savedServer = window.localStorage.getItem("saved-server");
// load the server if we have one
(async() => {
if (!savedServer || !(await tryConnect(savedServer))) {
document.getElementById('splash').style.display = 'none';
document.getElementById('main').style.display = 'block';
}
})();

View File

@ -0,0 +1,573 @@
// Translations from jellyfin-web/src/strings/
// Generated with:
// jq -n '[inputs | { lang: input_filename | split(".")[0], HeaderConnectToServer: .HeaderConnectToServer, LabelServerHost: .LabelServerHost, LabelServerHostHelp: .LabelServerHostHelp, Connect: .Connect, HeaderConnectionFailure: .HeaderConnectionFailure, MessageUnableToConnectToServer: .MessageUnableToConnectToServer, ButtonGotIt: .ButtonGotIt }]' *.json
const languages = [
{
"lang": "af",
"HeaderConnectToServer": "Konnekteer aan Bediener",
"LabelServerHost": "Gasheer:",
"LabelServerHostHelp": "192.168.1.100:8096 / https://myserver.com",
"Connect": "Konnekteer",
"HeaderConnectionFailure": "Konneksie Fout",
"MessageUnableToConnectToServer": "Ons kan nie tans aan die gekose bediener konnekteer nie. Maak seker dat die bediener werk en probeer weer.",
"ButtonGotIt": "Het Dit So"
},
{
"lang": "ar",
"HeaderConnectToServer": "اتصل إلى الخادم",
"LabelServerHost": "المضيف:",
"LabelServerHostHelp": "192.168.1.100:8096 أو https://myserver.com",
"Connect": "إتصال",
"HeaderConnectionFailure": "فشل في الاتصال",
"MessageUnableToConnectToServer": "لم نستطع الاتصال إلى الخادم المختار في الوقت الحالي. الرجاء التأكد من أنه يعمل ثم المحاولة مرة أخرى.",
"ButtonGotIt": "حسنا"
},
{
"lang": "bg-bg",
"HeaderConnectToServer": "Свържи се със сървър",
"LabelServerHost": "Хост:",
"LabelServerHostHelp": "192.168.1.100:8096 или https://myserver.com",
"Connect": "Свързване",
"HeaderConnectionFailure": "Проблем при свързване",
"MessageUnableToConnectToServer": "В момента не можем да се свържем с избрания сървър. Моля, уверете се, че работи и опитайте отново.",
"ButtonGotIt": "Добре"
},
{
"lang": "ca",
"HeaderConnectToServer": "Connectar al Servidor",
"LabelServerHost": "Amfitrió:",
"LabelServerHostHelp": "192.168.1.100:8096 o https://myserver.com",
"Connect": "Connecta",
"HeaderConnectionFailure": "Error de connexió",
"MessageUnableToConnectToServer": "Podem connectar amb el servidor seleccionat en aquest moment. Si us plau assegureu-vos que està funcionant i torna a intentar-ho.",
"ButtonGotIt": "Entesos"
},
{
"lang": "cs",
"HeaderConnectToServer": "Připojit k serveru",
"LabelServerHost": "Host:",
"LabelServerHostHelp": "192.168.1.100:8096 nebo https://mujserver.cz",
"Connect": "Připojit",
"HeaderConnectionFailure": "Připojení selhalo",
"MessageUnableToConnectToServer": "Nejsme schopni se připojit k vybranému serveru právě teď. Prosím, ujistěte se, že je spuštěn a zkuste to znovu.",
"ButtonGotIt": "Rozumím"
},
{
"lang": "da",
"HeaderConnectToServer": "Forbind til server",
"LabelServerHost": "Vært:",
"LabelServerHostHelp": "F. eks: 192.168.1.100:8096 eller https://myserver.com",
"Connect": "Forbind",
"HeaderConnectionFailure": "Forbindelsesfejl",
"MessageUnableToConnectToServer": "Vi kan ikke forbinde til den valgte server på nuværende tidspunkt. Sikrer dig venligst at serveren kører og prøv igen.",
"ButtonGotIt": "Forstået"
},
{
"lang": "de",
"HeaderConnectToServer": "Mit Server verbinden",
"LabelServerHost": "Adresse:",
"LabelServerHostHelp": "192.168.1.100 oder https://myserver.com",
"Connect": "Verbinden",
"HeaderConnectionFailure": "Verbindungsfehler",
"MessageUnableToConnectToServer": "Wir können gerade keine Verbindung zum gewählten Server herstellen. Bitte stelle sicher, dass dieser läuft und versuche es erneut.",
"ButtonGotIt": "Verstanden"
},
{
"lang": "el",
"HeaderConnectToServer": "Σύνδεση στον Διακομιστή",
"LabelServerHost": "Διακομιστής:",
"LabelServerHostHelp": "192.168.1.100:8096 ή https://myserver.com",
"Connect": "Σύνδεση",
"HeaderConnectionFailure": "Αποτυχία σύνδεσης",
"MessageUnableToConnectToServer": "Δεν είναι δυνατή η σύνδεση με τον επιλεγμένο διακομιστή αυτή τη στιγμή. Βεβαιωθείτε ότι εκτελείται και προσπαθήστε ξανά.",
"ButtonGotIt": "Το κατάλαβα"
},
{
"lang": "en-gb",
"HeaderConnectToServer": "Connect to Server",
"LabelServerHost": "Host:",
"LabelServerHostHelp": "192.168.1.100:8096 or https://myserver.com",
"Connect": "Connect",
"HeaderConnectionFailure": "Connection Failure",
"MessageUnableToConnectToServer": "We're unable to connect to the selected server right now. Please ensure it is running and try again.",
"ButtonGotIt": "Got It"
},
{
"lang": "en-us",
"HeaderConnectToServer": "Connect to Server",
"LabelServerHost": "Host:",
"LabelServerHostHelp": "192.168.1.100:8096 or https://myserver.com",
"Connect": "Connect",
"HeaderConnectionFailure": "Connection Failure",
"MessageUnableToConnectToServer": "We're unable to connect to the selected server right now. Please ensure it is running and try again.",
"ButtonGotIt": "Got It"
},
{
"lang": "eo",
"HeaderConnectToServer": "Konekti al Servilo",
"LabelServerHost": "Gastigo:",
"LabelServerHostHelp": "192.168.1.100:8096 aŭ https://myserver.com",
"Connect": "Konektu",
"HeaderConnectionFailure": "Konekto Malsukcesis",
"MessageUnableToConnectToServer": "Ni ne povas konektiĝi al la elektita servilo nun. Certigi, ke ĝi funkcias kaj provi denove.",
"ButtonGotIt": "Kompreneblas"
},
{
"lang": "es_419",
"HeaderConnectToServer": "Conectarse al servidor",
"LabelServerHost": "Servidor:",
"LabelServerHostHelp": "192.168.1.100:8096 o https://miservidor.com",
"Connect": "Conectar",
"HeaderConnectionFailure": "Falla de conexión",
"MessageUnableToConnectToServer": "No podemos conectarnos al servidor seleccionado en este momento. Por favor, asegúrate de que está funcionando e inténtalo de nuevo.",
"ButtonGotIt": "Hecho"
},
{
"lang": "es-ar",
"HeaderConnectToServer": "Conectar al servidor",
"LabelServerHost": "Host:",
"LabelServerHostHelp": "192.168.1.100:8096 o https://miservidor.com",
"Connect": "Conectar",
"HeaderConnectionFailure": "Conexión fallida",
"MessageUnableToConnectToServer": "No podemos conectarnos al servidor seleccionado en este momento. Asegúrese de que se esté ejecutando e intente nuevamente.",
"ButtonGotIt": "Lo entendí"
},
{
"lang": "es",
"HeaderConnectToServer": "Conectar al servidor",
"LabelServerHost": "Host:",
"LabelServerHostHelp": "192.168.1.100:8096 o https://miservidor.com",
"Connect": "Conectar",
"HeaderConnectionFailure": "Fallo de conexión",
"MessageUnableToConnectToServer": "No podemos conectar con el servidor seleccionado ahora mismo. Por favor, asegúrate de que esta funcionando e inténtalo otra vez.",
"ButtonGotIt": "Entendido"
},
{
"lang": "es-mx",
"HeaderConnectToServer": "Conectarse al servidor",
"LabelServerHost": "Servidor:",
"LabelServerHostHelp": "192.168.1.100:8096 o https://miservidor.com",
"Connect": "Conectar",
"HeaderConnectionFailure": "Falla de conexión",
"MessageUnableToConnectToServer": "No podemos conectarnos al servidor seleccionado en este momento. Por favor, asegúrate de que está funcionando e inténtalo de nuevo.",
"ButtonGotIt": "Hecho"
},
{
"lang": "et",
"HeaderConnectToServer": "Ühendu serveriga",
"LabelServerHost": "Peremeesmasin:",
"LabelServerHostHelp": "192.168.1.100:8096 või https://myserver.com",
"Connect": "Ühenda",
"HeaderConnectionFailure": "Ühenduse tõrge",
"MessageUnableToConnectToServer": "Me ei saa praegu valitud serveriga ühendust. Veendu, et see töötab ja proovi uuesti.",
"ButtonGotIt": "Selge"
},
{
"lang": "eu",
"HeaderConnectToServer": "Zerbitzariari konektatu",
"LabelServerHost": "Host:",
"LabelServerHostHelp": "192.168.1.100: 8096 edo https://miservidor.com",
"Connect": "Konektatu",
"HeaderConnectionFailure": "Konexio-akatsa",
"MessageUnableToConnectToServer": "Ezin dugu une honetan hautatutako zerbitzariarekin konektatu. Mesedez, ziurtatu funtzionatzen ari dela eta saiatu berriro.",
"ButtonGotIt": "Ulertua"
},
{
"lang": "fa",
"HeaderConnectToServer": "اتصال به سرور",
"LabelServerHost": "میزبان:",
"LabelServerHostHelp": "192.168.1.100:8096 یا https://myserver.com",
"Connect": "اتصال",
"HeaderConnectionFailure": "عدم اتصال",
"MessageUnableToConnectToServer": "",
"ButtonGotIt": "متوجه شدم"
},
{
"lang": "fi",
"HeaderConnectToServer": "Yhdistä palvelimeen",
"LabelServerHost": "Isäntä:",
"LabelServerHostHelp": "192.168.1.100:8096 tai https://myserver.com",
"Connect": "Yhdistä",
"HeaderConnectionFailure": "Yhteys epäonnistui",
"MessageUnableToConnectToServer": "Valittuun palvelimeen yhdistäminen epäonnistui. Tarkista, että se on päällä ja yritä uudestaan.",
"ButtonGotIt": "Selvä"
},
{
"lang": "fil",
"HeaderConnectToServer": "Kumonekta sa Server",
"LabelServerHost": "Host:",
"LabelServerHostHelp": "192.168.1.100:8096 o https://myserver.com",
"Connect": "Kumonekta",
"HeaderConnectionFailure": "Nag-fail ang koneksyon",
"MessageUnableToConnectToServer": "Hindi kami makakonekta sa napiling server sa ngayon. Pakitiyak na ito ay tumatakbo at subukang muli.",
"ButtonGotIt": "Nakuha ko"
},
{
"lang": "fr-ca",
"HeaderConnectToServer": "Connexion au serveur",
"LabelServerHost": "Nom d'hôte :",
"LabelServerHostHelp": "192.168.1.100:8096 / https://myserver.com",
"Connect": "Connexion",
"HeaderConnectionFailure": "Échec de connexion",
"MessageUnableToConnectToServer": "Impossible de se connecter au serveur sélectionné. Assurez-vous qu'il est opérationnel.",
"ButtonGotIt": "J'ai compris"
},
{
"lang": "fr",
"HeaderConnectToServer": "Connexion au serveur",
"LabelServerHost": "Nom d'hôte :",
"LabelServerHostHelp": "192.168.1.1:8096 ou https://monserveur.com",
"Connect": "Se connecter",
"HeaderConnectionFailure": "Échec de connexion",
"MessageUnableToConnectToServer": "Nous sommes dans l'impossibilité de nous connecter au serveur sélectionné. Veuillez vérifier qu'il est opérationnel et réessayez.",
"ButtonGotIt": "Compris"
},
{
"lang": "he",
"HeaderConnectToServer": "התחבר לשרת",
"LabelServerHost": "מארח:",
"LabelServerHostHelp": "192.168.1.100:8096 / https://myserver.com",
"Connect": "התחבר",
"HeaderConnectionFailure": "כשל בחיבור",
"MessageUnableToConnectToServer": "לא ניתן להתחבר לשרת שנבחר. נא לוודא שהוא פעיל ולנסות שוב.",
"ButtonGotIt": "הבנתי"
},
{
"lang": "hr",
"HeaderConnectToServer": "Spoji se na Server",
"LabelServerHost": "Domaćin:",
"LabelServerHostHelp": "192.168.1.100 ili https://myserver.com",
"Connect": "Povezati",
"HeaderConnectionFailure": "Neuspjelo spajanje",
"MessageUnableToConnectToServer": "Nismo u mogućnosti spojiti se na odabrani poslužitelj. Provjerite dali je pokrenut i pokušajte ponovno.",
"ButtonGotIt": "Shvaćam"
},
{
"lang": "hu",
"HeaderConnectToServer": "Kapcsolódás a Szerverhez",
"LabelServerHost": "Kiszolgáló:",
"LabelServerHostHelp": "192.168.1.100:8096 vagy https://myserver.com",
"Connect": "Kapcsolódás",
"HeaderConnectionFailure": "Kapcsolathiba",
"MessageUnableToConnectToServer": "Jelenleg nem tudunk csatlakozni a kiválasztott szerverhez. Győződj meg róla, hogy fut és próbáld meg újra.",
"ButtonGotIt": "Értettem"
},
{
"lang": "id",
"HeaderConnectToServer": "Sambungkan ke server",
"LabelServerHost": "Host :",
"LabelServerHostHelp": "192.168.1.100:8096 atau https://myserver.com",
"Connect": "Sambung",
"HeaderConnectionFailure": "Koneksi Bermasalah",
"MessageUnableToConnectToServer": "Kami tidak dapat terhubung ke server yang dipilih sekarang. Harap pastikan itu berjalan dan coba lagi.",
"ButtonGotIt": "Paham"
},
{
"lang": "it",
"HeaderConnectToServer": "Connettersi al Server",
"LabelServerHost": "Host:",
"LabelServerHostHelp": "192.168.1.100:8096 o https://myserver.com",
"Connect": "Connetti",
"HeaderConnectionFailure": "Errore di connessione",
"MessageUnableToConnectToServer": "Non siamo in grado di connettersi al server selezionato al momento. Per favore assicurati che sia in esecuzione e riprova.",
"ButtonGotIt": "Ho capito"
},
{
"lang": "ja",
"HeaderConnectToServer": "サーバーに接続",
"LabelServerHost": "ホスト:",
"LabelServerHostHelp": "192.168.1.100:8096 又は https://myserver.com",
"Connect": "接続",
"HeaderConnectionFailure": "接続失敗",
"MessageUnableToConnectToServer": "現在、選択されたサーバーへの接続ができません。稼働していることを確認しもう一度やり直してください。",
"ButtonGotIt": "了解"
},
{
"lang": "kk",
"HeaderConnectToServer": "Serverge qosylu",
"LabelServerHost": "Tüiın:",
"LabelServerHostHelp": "192.168.1.100:8096 nemese https://myserver.com",
"Connect": "Qosylu",
"HeaderConnectionFailure": "Qosylu sätsız",
"MessageUnableToConnectToServer": "Tañdalğan serverge qosyluymyz däl qazır mümkın emes. Būl ıske qosylğanyna köz jetkızıñız jäne ärekettı keiın qaitalañyz.",
"ButtonGotIt": "Tüsınıktı"
},
{
"lang": "ko",
"HeaderConnectToServer": "서버 접속",
"LabelServerHost": "호스트:",
"LabelServerHostHelp": "192.168.1.100:8096 또는 https://myserver.com",
"Connect": "접속",
"HeaderConnectionFailure": "연결 실패",
"MessageUnableToConnectToServer": "선택한 서버에 연결할 수 없습니다. 서버가 실행 중인지 확인후 다시 시도하세요.",
"ButtonGotIt": "알겠습니다"
},
{
"lang": "lt-lt",
"HeaderConnectToServer": "Prisijungti prie serverio",
"LabelServerHost": "Resursas:",
"LabelServerHostHelp": "192.168.1.100:8096 / https://myserver.com",
"Connect": "Prisijungti",
"HeaderConnectionFailure": "Prisijungimo klaida",
"MessageUnableToConnectToServer": "Šiuo metu negalime prisijungti prie pasirinkto serverio. Įsitikinkite, kad jis veikia ir bandykite dar kartą.",
"ButtonGotIt": "Supratau"
},
{
"lang": "lv",
"HeaderConnectToServer": "Pievienoties pie Servera",
"LabelServerHost": "Resursdators:",
"LabelServerHostHelp": "192.168.1.100:8096 vai https://myserver.com",
"Connect": "Savienot",
"HeaderConnectionFailure": "Savienojuma Kļūda",
"MessageUnableToConnectToServer": "Mēs pašlaik nevaram sazināties ar izvēlēto serveri. Pārliecinies ka tas strādā, un mēģini vēlreiz.",
"ButtonGotIt": "Sapratu"
},
{
"lang": "ml",
"HeaderConnectToServer": "സെർവറിലേക്ക് കണക്റ്റുചെയ്യുക",
"LabelServerHost": "ഹോസ്റ്റ്:",
"LabelServerHostHelp": "192.168.1.100:8096 അല്ലെങ്കിൽ https://myserver.com",
"Connect": "ബന്ധിപ്പിക്കുക",
"HeaderConnectionFailure": "കണക്ഷൻ പരാജയം",
"MessageUnableToConnectToServer": "തിരഞ്ഞെടുത്ത സെർവറിലേക്ക് ഞങ്ങൾക്ക് ഇപ്പോൾ കണക്റ്റുചെയ്യാൻ കഴിയില്ല. ഇത് പ്രവർത്തിക്കുന്നുവെന്ന് ഉറപ്പാക്കി വീണ്ടും ശ്രമിക്കുക.",
"ButtonGotIt": "മനസ്സിലായി"
},
{
"lang": "nb",
"HeaderConnectToServer": "Koble til server",
"LabelServerHost": "Vertsnavn:",
"LabelServerHostHelp": "192.168.1.100:8096 eller https://dinserver.no",
"Connect": "Koble til",
"HeaderConnectionFailure": "Tilkobling feilet",
"MessageUnableToConnectToServer": "Vi klarte ikke å koble til den valgte serveren akkurat nå. Vennligst sørg for at den kjører og prøv på nytt.",
"ButtonGotIt": "Skjønner"
},
{
"lang": "nl",
"HeaderConnectToServer": "Verbind met server",
"LabelServerHost": "Server:",
"LabelServerHostHelp": "192.168.1.100:8096 of https://mijnserver.nl",
"Connect": "Verbind",
"HeaderConnectionFailure": "Verbindingsfout",
"MessageUnableToConnectToServer": "Het is momenteel niet mogelijk met de geselecteerde server te verbinden. Controleer dat deze draait en probeer het opnieuw.",
"ButtonGotIt": "Begrepen"
},
{
"lang": "pl",
"HeaderConnectToServer": "Podłącz do Serwera",
"LabelServerHost": "Serwer:",
"LabelServerHostHelp": "192.168.1.100:8096 or https://myserver.com",
"Connect": "Połącz",
"HeaderConnectionFailure": "Niepowodzenie połączenia",
"MessageUnableToConnectToServer": "Połączenie z wybranym serwerem jest teraz niemożliwe. Upewnij się, że jest uruchomiony i spróbuj ponownie.",
"ButtonGotIt": "Rozumiem"
},
{
"lang": "pt-br",
"HeaderConnectToServer": "Conectar ao Servidor",
"LabelServerHost": "Servidor:",
"LabelServerHostHelp": "192.168.1.100:8096 ou https://meuservidor.com",
"Connect": "Conectar",
"HeaderConnectionFailure": "Falha na Conexão",
"MessageUnableToConnectToServer": "Não foi possível conectar ao servidor selecionado. Por favor, verifique se está sendo executado e tente novamente.",
"ButtonGotIt": "Feito"
},
{
"lang": "pt",
"HeaderConnectToServer": "Ligar ao Servidor",
"LabelServerHost": "Servidor:",
"LabelServerHostHelp": "192.168.1.100:8096 ou https://omeudominio.com",
"Connect": "Ligar",
"HeaderConnectionFailure": "Falha de Ligação",
"MessageUnableToConnectToServer": "Não foi possível estabelecer ligação ao servidor. Por favor, certifique-se que o servidor está a correr e tente de novo.",
"ButtonGotIt": "Entendido"
},
{
"lang": "pt-pt",
"HeaderConnectToServer": "Ligar ao Servidor",
"LabelServerHost": "Servidor:",
"LabelServerHostHelp": "192.168.1.100:8096 ou https://omeudominio.com",
"Connect": "Ligar",
"HeaderConnectionFailure": "Falha de Ligação",
"MessageUnableToConnectToServer": "Não foi possível estabelecer ligação ao servidor. Por favor, certifique-se de que o servidor está a correr e tente de novo.",
"ButtonGotIt": "Entendido"
},
{
"lang": "ro",
"HeaderConnectToServer": "Conectați-vă la server",
"LabelServerHost": "Gazdă:",
"LabelServerHostHelp": "192.168.1.100:8096 sau https://myserver.com",
"Connect": "Conectare",
"HeaderConnectionFailure": "Conexiune eșuată",
"MessageUnableToConnectToServer": "Nu putem să ne conectăm la serverul selectat în acest moment. Vă rugăm să vă asigurați că funcționează și încercați din nou.",
"ButtonGotIt": "Am înțeles"
},
{
"lang": "ru",
"HeaderConnectToServer": "Соединение с сервером",
"LabelServerHost": "Узел:",
"LabelServerHostHelp": "192.168.1.100:8096 или https://myserver.com",
"Connect": "Соединиться",
"HeaderConnectionFailure": "Сбой соединения",
"MessageUnableToConnectToServer": "Мы не можем подсоединиться к выбранному серверу в данный момент. Убедитесь, что он запущен и повторите попытку.",
"ButtonGotIt": "Понятно"
},
{
"lang": "sk",
"HeaderConnectToServer": "Pripojiť sa k serveru",
"LabelServerHost": "Hosť:",
"LabelServerHostHelp": "192.168.1.100:8096 alebo https://mojserver.sk",
"Connect": "Pripojiť",
"HeaderConnectionFailure": "Pripojenie zlyhalo",
"MessageUnableToConnectToServer": "Nie sme schopný sa aktuálne pripojiť k vybranému serveru. Prosím, uistite sa, že je spustený a skúste to znovu.",
"ButtonGotIt": "Rozumiem"
},
{
"lang": "sl-si",
"HeaderConnectToServer": "Poveži s strežnikom",
"LabelServerHost": "Naslov strežnika:",
"LabelServerHostHelp": "192.168.1.100:8096 ali https://myserver.com",
"Connect": "Poveži",
"HeaderConnectionFailure": "Napaka povezave",
"MessageUnableToConnectToServer": "Povezava s strežnikom trenutno ni mogoča. Preverite, da je strežnik zagnan in poskusite ponovno.",
"ButtonGotIt": "Razumem"
},
{
"lang": "sr",
"HeaderConnectToServer": "Повежи се са сервером",
"LabelServerHost": "Домаћин:",
"LabelServerHostHelp": "192.168.1.100:8096 или https://myserver.com",
"Connect": "Повежи",
"HeaderConnectionFailure": "Спајање неуспешно",
"MessageUnableToConnectToServer": "Тренутно нисмо у могућности да се повежемо са изабраним сервером. Уверите се да је покренут и покушајте поново.",
"ButtonGotIt": "У реду"
},
{
"lang": "sv",
"HeaderConnectToServer": "Anslut till server",
"LabelServerHost": "Värd:",
"LabelServerHostHelp": "192.168.1.100:8096 eller https://min.server.com",
"Connect": "Anslut",
"HeaderConnectionFailure": "Misslyckad anslutning",
"MessageUnableToConnectToServer": "Vi kunde inte upprätta anslutning till vald server just nu. Försäkra dig om att den är påslagen och försök igen.",
"ButtonGotIt": "Ok"
},
{
"lang": "ta",
"HeaderConnectToServer": "சேவையகத்துடன் இணைக்கவும்",
"LabelServerHost": "தொகுப்பாளர்:",
"LabelServerHostHelp": "192.168.1.100:8096 or https://myserver.com",
"Connect": "இணைக்கவும்",
"HeaderConnectionFailure": "இணைப்பு தோல்வி",
"MessageUnableToConnectToServer": "தேர்ந்தெடுக்கப்பட்ட சேவையகத்துடன் இப்போது எங்களால் இணைக்க முடியவில்லை. இது இயங்குவதை உறுதிசெய்து மீண்டும் முயற்சிக்கவும்.",
"ButtonGotIt": "அறிந்துகொண்டேன்"
},
{
"lang": "te",
"HeaderConnectToServer": "సర్వర్‌కు కనెక్ట్ అవ్వండి",
"LabelServerHost": "హోస్ట్:",
"LabelServerHostHelp": "192.168.1.100:8096 లేదా https://myserver.com",
"Connect": "కనెక్ట్ చేయండి",
"HeaderConnectionFailure": "కనెక్షన్ వైఫల్యం",
"MessageUnableToConnectToServer": "మేము ప్రస్తుతం ఎంచుకున్న సర్వర్‌కు కనెక్ట్ చేయలేకపోయాము. దయచేసి ఇది నడుస్తున్నట్లు నిర్ధారించుకోండి మరియు మళ్లీ ప్రయత్నించండి.",
"ButtonGotIt": "దొరికింది"
},
{
"lang": "tr",
"HeaderConnectToServer": "Sunucuya Bağlan",
"LabelServerHost": "Ev sahibi:",
"LabelServerHostHelp": "192.168.1.100:8096 veya https://sunucum.com",
"Connect": "Bağlan",
"HeaderConnectionFailure": "Bağlantı Hatası",
"MessageUnableToConnectToServer": "Şu anda seçilen sunucuya bağlanamıyoruz. Lütfen sunucunun açık olduğundan emin olun ve tekrar deneyin.",
"ButtonGotIt": "Anlaşıldı"
},
{
"lang": "uk",
"HeaderConnectToServer": "Підключення до сервера",
"LabelServerHost": "Хост:",
"LabelServerHostHelp": "192.168.1.100:8096 або https://myserver.com",
"Connect": "Підключитись",
"HeaderConnectionFailure": "Помилка підключення",
"MessageUnableToConnectToServer": "Зараз ми не можемо підключитися до вибраного сервера. Переконайтеся, що він запущений, і повторіть спробу.",
"ButtonGotIt": "Зрозуміло"
},
{
"lang": "vi",
"HeaderConnectToServer": "Kết Nối Đến Máy Chủ",
"LabelServerHost": "Máy chủ:",
"LabelServerHostHelp": "192.168.1.100:8096 hoặc https://myserver.com",
"Connect": "Kết nối",
"HeaderConnectionFailure": "Kế Nối Thất Bại",
"MessageUnableToConnectToServer": "Chúng tôi không thể kết nối với máy chủ đã chọn ngay bây giờ. Hãy đảm bảo rằng nó đang chạy và thử lại.",
"ButtonGotIt": "Hiểu rồi"
},
{
"lang": "zh-cn",
"HeaderConnectToServer": "连接到服务器",
"LabelServerHost": "主机:",
"LabelServerHostHelp": "192.168.1.100:8096 或 https://myserver.com",
"Connect": "连接",
"HeaderConnectionFailure": "连接失败",
"MessageUnableToConnectToServer": "现在无法连接所选择的服务器,请确保该服务器目前正在运行。",
"ButtonGotIt": "知道了"
},
{
"lang": "zh-hk",
"HeaderConnectToServer": "連接至伺服器",
"LabelServerHost": "主機:",
"LabelServerHostHelp": "192.168.1.100:8096 或是 https://myserver.com",
"Connect": "連接",
"HeaderConnectionFailure": "連接失敗",
"MessageUnableToConnectToServer": "無法連上所選的伺服器,請確保該伺服器正在運作中。",
"ButtonGotIt": "了解"
},
{
"lang": "zh-tw",
"HeaderConnectToServer": "連結至伺服器",
"LabelServerHost": "主機:",
"LabelServerHostHelp": "192.168.1.100:8096 或是 https://myserver.com",
"Connect": "連結",
"HeaderConnectionFailure": "連結失敗",
"MessageUnableToConnectToServer": "無法連上所選的伺服器,請確保該伺服器正在運作中。",
"ButtonGotIt": "我知道了"
}
]
;
const fallbackLanguage = 'en-us';
function getDefaultLanguage() {
if (navigator.language) {
return navigator.language;
}
if (navigator.userLanguage) {
return navigator.userLanguage;
}
if (navigator.languages && navigator.languages.length) {
return navigator.languages[0];
}
return fallbackLanguage;
}
let language = getDefaultLanguage().toLowerCase();
if (!languages.find(l => l.lang === language)) {
language = language.split('-')[0];
}
if (!languages.find(l => l.lang === language)) {
language = fallbackLanguage;
}
const languageStrings = languages.find(l => l.lang === language);
document.getElementById('title').innerText = languageStrings.HeaderConnectToServer;
document.getElementById('address-label').innerText = languageStrings.LabelServerHost;
document.getElementById('helper-text').innerText = languageStrings.LabelServerHostHelp;
document.getElementById('connect-button').innerText = languageStrings.Connect;
document.getElementById('connect-fail-title').innerText = languageStrings.HeaderConnectionFailure;
document.getElementById('connect-fail-text').innerText = languageStrings.MessageUnableToConnectToServer;
document.getElementById('connect-fail-button').innerText = languageStrings.ButtonGotIt;

34
native/logo.svg Normal file
View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- ***** BEGIN LICENSE BLOCK *****
- Part of the Jellyfin project (https://jellyfin.media)
-
- All copyright belongs to the Jellyfin contributors; a full list can
- be found in the file CONTRIBUTORS.md
-
- This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License.
- To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/.
- ***** END LICENSE BLOCK ***** -->
<svg id="banner-dark" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 1536 512">
<defs>
<linearGradient id="linear-gradient" x1="110.25" y1="213.3" x2="496.14" y2="436.09" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#aa5cc3"/>
<stop offset="1" stop-color="#00a4dc"/>
</linearGradient>
</defs>
<title>banner-dark</title>
<g id="banner-dark">
<g id="banner-dark-icon">
<path id="inner-shape" d="M261.42,201.62c-20.44,0-86.24,119.29-76.2,139.43s142.48,19.92,152.4,0S281.86,201.63,261.42,201.62Z" fill="url(#linear-gradient)"/>
<path id="outer-shape" d="M261.42,23.3C199.83,23.3,1.57,382.73,31.8,443.43s429.34,60,459.24,0S323,23.3,261.42,23.3ZM411.9,390.76c-19.59,39.33-281.08,39.77-300.9,0S221.1,115.48,261.45,115.48,431.49,351.42,411.9,390.76Z" fill="url(#linear-gradient)"/>
</g>
<g id="jellyfin-light-outlines" style="isolation:isolate" transform="translate(43.8)">
<path d="M556.64,350.75a67,67,0,0,1-22.87-27.47,8.91,8.91,0,0,1-1.49-4.75,7.42,7.42,0,0,1,2.83-5.94,9.25,9.25,0,0,1,6.09-2.38c3.16,0,5.94,1.69,8.31,5.05a48.09,48.09,0,0,0,16.34,20.34,40.59,40.59,0,0,0,24,7.58q20.51,0,33.27-12.62t12.77-33.12V159a8.44,8.44,0,0,1,2.67-6.39,9.56,9.56,0,0,1,6.83-2.52,9,9,0,0,1,6.68,2.52,8.7,8.7,0,0,1,2.53,6.39v138.4a64.7,64.7,0,0,1-8.32,32.67,59,59,0,0,1-23,22.72Q608.62,361,589.9,361A57.21,57.21,0,0,1,556.64,350.75Z" fill="#fff"/>
<path d="M831.66,279.47a8.77,8.77,0,0,1-6.24,2.53H713.16q0,17.82,7.27,31.92a54.91,54.91,0,0,0,20.79,22.28q13.51,8.18,31.93,8.17a54,54,0,0,0,25.54-5.94,52.7,52.7,0,0,0,18.12-15.15,10,10,0,0,1,6.24-2.67,8.14,8.14,0,0,1,7.72,7.72,8.81,8.81,0,0,1-3,6.24,74.7,74.7,0,0,1-23.91,19A65.56,65.56,0,0,1,773.45,361q-22.87,0-40.4-9.8a69.51,69.51,0,0,1-27.32-27.48q-9.79-17.66-9.8-40.83,0-24.36,9.65-42.62t25.69-27.92a65.2,65.2,0,0,1,34.16-9.65A70,70,0,0,1,798.84,211a65.78,65.78,0,0,1,25.39,24.36q9.81,16,10.1,38A8.07,8.07,0,0,1,831.66,279.47ZM733.5,231.8Q718.8,243.68,714.64,266H815.92v-2.38A46.91,46.91,0,0,0,807,240.27a48.47,48.47,0,0,0-18.56-15.15,54,54,0,0,0-23-5.2Q748.2,219.92,733.5,231.8Z" fill="#fff"/>
<path d="M888.24,355.5a8.92,8.92,0,0,1-15.3-6.38v-202a8.91,8.91,0,1,1,17.82,0v202A8.65,8.65,0,0,1,888.24,355.5Z" fill="#fff"/>
<path d="M956.55,355.5a8.92,8.92,0,0,1-15.3-6.38v-202a8.91,8.91,0,1,1,17.82,0v202A8.65,8.65,0,0,1,956.55,355.5Z" fill="#fff"/>
<path d="M1122.86,206.11a8.7,8.7,0,0,1,2.53,6.39v131q0,23.44-9.21,40.09a61.58,61.58,0,0,1-25.54,25.25q-16.34,8.61-36.83,8.61a96.73,96.73,0,0,1-23.31-2.68,61.72,61.72,0,0,1-18-7.12q-6.24-3.87-6.24-8.62a17.94,17.94,0,0,1,.6-3,8.06,8.06,0,0,1,3-4.45,7.49,7.49,0,0,1,4.45-1.49,7.91,7.91,0,0,1,3.56.89q19,10.39,36.24,10.4,24.65,0,39.06-15.44t14.4-42.18V333.38a54.37,54.37,0,0,1-21.38,20,62.55,62.55,0,0,1-30.3,7.58q-25.83,0-39.2-15.45t-13.37-41.87V212.5a8.91,8.91,0,1,1,17.82,0V301q0,21.39,9.36,32.38t29.25,11a48,48,0,0,0,23.32-6.09,49.88,49.88,0,0,0,17.82-16,37.44,37.44,0,0,0,6.68-21.24V212.5a9,9,0,0,1,15.29-6.39Z" fill="#fff"/>
<path d="M1210.18,161.41q-5.21,6.24-5.2,17.23v30.59h33.27a8.19,8.19,0,0,1,5.79,2.38,8.26,8.26,0,0,1,0,11.88,8.22,8.22,0,0,1-5.79,2.37H1205V349.12a8.91,8.91,0,1,1-17.82,0V225.86h-21.68a7.83,7.83,0,0,1-5.94-2.52,8.21,8.21,0,0,1-2.37-5.79,8,8,0,0,1,2.37-6.09,8.33,8.33,0,0,1,5.94-2.23h21.68V178.64q0-18.7,10.84-29t29-10.24a46.1,46.1,0,0,1,15.45,2.52q7.13,2.53,7.12,8.17a8.07,8.07,0,0,1-2.37,5.94,7.37,7.37,0,0,1-5.35,2.37,18.81,18.81,0,0,1-6.53-1.48,42,42,0,0,0-10.4-1.78Q1215.37,155.18,1210.18,161.41ZM1276,180.87c-2.19-1.88-3.27-4.61-3.27-8.17v-3q0-5.34,3.41-8.17t9.36-2.82q11.88,0,11.88,11v3c0,3.56-1,6.29-3.12,8.17s-5.1,2.82-9.06,2.82S1278.14,182.75,1276,180.87Zm15.59,174.63a8.92,8.92,0,0,1-15.3-6.38V212.5a8.91,8.91,0,1,1,17.82,0V349.12A8.65,8.65,0,0,1,1291.56,355.5Z" fill="#fff"/>
<path d="M1452.53,218.88q12.92,16.2,12.92,42.92v87.32a8.4,8.4,0,0,1-2.67,6.38,8.8,8.8,0,0,1-6.24,2.53,8.64,8.64,0,0,1-8.91-8.91V262.69q0-19.31-9.65-31.33t-29.85-12a53.28,53.28,0,0,0-42.77,21.83,36.24,36.24,0,0,0-7.13,21.53v86.43a8.91,8.91,0,1,1-17.82,0V216.06a8.91,8.91,0,1,1,17.82,0V232.4q8-12.77,23-21.24A61.84,61.84,0,0,1,1412,202.7Q1439.61,202.7,1452.53,218.88Z" fill="#fff"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@ -291,6 +291,39 @@ async function showSettingsModal() {
createSection();
}
if (window.localStorage.getItem("saved-server") != null) {
const group = document.createElement("fieldset");
group.className = "editItemMetadataForm editMetadataForm dialog-content-centered";
group.style.border = 0;
group.style.outline = 0;
modalContents.appendChild(group);
const legend = document.createElement("legend");
const legendHeader = document.createElement("h2");
legendHeader.textContent = "Saved Server";
legend.appendChild(legendHeader);
const legendSubHeader = document.createElement("h4");
legendSubHeader.textContent = (
"The server you first connected to is your saved server. " +
"It provides the web client for Jellyfin Media Player in the absence of a bundled one. " +
"You can use this option to change it to another one. This does NOT log you off."
);
legend.appendChild(legendSubHeader);
group.appendChild(legend);
const resetSavedServer = document.createElement("button");
resetSavedServer.className = "raised button-cancel block btnCancel emby-button";
resetSavedServer.textContent = "Reset Saved Server"
resetSavedServer.style.marginLeft = "auto";
resetSavedServer.style.marginRight = "auto";
resetSavedServer.style.maxWidth = "50%";
resetSavedServer.addEventListener("click", () => {
window.localStorage.removeItem("saved-server");
window.location.hash = "";
window.location.reload();
});
group.appendChild(resetSavedServer);
}
const closeContainer = document.createElement("div");
closeContainer.className = "formDialogFooter";
modalContents.appendChild(closeContainer);

View File

@ -128,6 +128,10 @@
"value": "ignoreSSLErrors",
"default": false,
"hidden": true
},
{
"value": "forceExternalWebclient",
"default": false
}
]
},

View File

@ -107,7 +107,9 @@ endif()
set(RESOURCE_ROOT .)
if(APPLE)
set(RESOURCE_ROOT Resources)
add_resources(TARGET ${MAIN_TARGET} SOURCES ${CMAKE_CURRENT_BINARY_DIR}/../dist/ DEST ${RESOURCE_ROOT}/web-client/desktop)
if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/../dist/)
add_resources(TARGET ${MAIN_TARGET} SOURCES ${CMAKE_CURRENT_BINARY_DIR}/../dist/ DEST ${RESOURCE_ROOT}/web-client/desktop)
endif()
add_resources(TARGET ${MAIN_TARGET} SOURCES ${CMAKE_SOURCE_DIR}/native/ DEST ${RESOURCE_ROOT}/web-client/extension)
endif()
@ -121,7 +123,9 @@ if(NOT APPLE)
install(FILES ${loc}/qtwebengine_devtools_resources.pak DESTINATION resources)
endif()
endforeach()
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../dist/ DESTINATION ${INSTALL_RESOURCE_DIR}/web-client/desktop)
if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/../dist/)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../dist/ DESTINATION ${INSTALL_RESOURCE_DIR}/web-client/desktop)
endif()
install(DIRECTORY ${CMAKE_SOURCE_DIR}/native/ DESTINATION ${INSTALL_RESOURCE_DIR}/web-client/extension)
endif()

View File

@ -100,7 +100,8 @@ int main(int argc, char *argv[])
{"windowed", "Start in windowed mode"},
{"fullscreen", "Start in fullscreen"},
{"terminal", "Log to terminal"},
{"disable-gpu", "Disable QtWebEngine gpu accel"}});
{"disable-gpu", "Disable QtWebEngine gpu accel"},
{"force-external-webclient","Use webclient provided by server"}});
auto scaleOption = QCommandLineOption("scale-factor", "Set to a integer or default auto which controls" \
"the scale (DPI) of the desktop interface.");

View File

@ -1,5 +1,6 @@
#include <QDebug>
#include <QFile>
#include <QFileInfo>
#include "SettingsComponent.h"
#include "SettingsSection.h"
#include "Paths.h"
@ -726,6 +727,13 @@ QString SettingsComponent::getWebClientUrl(bool desktop)
if (url == "bundled")
{
auto path = Paths::webClientPath("desktop");
QFileInfo check_file(path);
if (SettingsComponent::Get().value(SETTINGS_SECTION_MAIN, "forceExternalWebclient").toBool() ||
!(check_file.exists() && check_file.isFile())) {
// use built-in fallback
path = Paths::webExtensionPath() + "find-webclient.html";
}
url = "file:///" + path;
}
@ -784,6 +792,8 @@ void SettingsComponent::setCommandLineValues(const QStringList& values)
setValue(SETTINGS_SECTION_MAIN, "layout", "desktop");
else if (value == "tv")
setValue(SETTINGS_SECTION_MAIN, "layout", "tv");
else if (value == "force-external-webclient")
setValue(SETTINGS_SECTION_MAIN, "forceExternalWebclient", true);
}
}