1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
jellyfin-web/src/scripts/settings/webSettings.js
2020-04-27 18:49:11 +03:00

18 lines
468 B
JavaScript

let data;
function getConfig() {
if (data) return Promise.resolve(data);
return fetch("/config.json?nocache=" + new Date().getUTCMilliseconds()).then(function (response) {
data = response.json();
return data;
});
}
export function enableMultiServer() {
return getConfig().then(config => {
return config.multiserver;
}).catch(error => {
console.log("cannot get web config:", error);
return false;
});
}