Add backup export and local artwork storage
This commit is contained in:
1 parent
63dbc3a6d4
commit
a4bb9a98c2
14 files changed
+1745
-46
No files matched your search
@@ -25,6 +25,18 @@
|
||||
return h;
|
||||
}
|
||||
|
||||
function authHeaders(contentType) {
|
||||
const qs = new URLSearchParams(location.search);
|
||||
const t = token() || qs.get("token") || qs.get("api_key") || "";
|
||||
const h = {};
|
||||
if (contentType) h["Content-Type"] = contentType;
|
||||
if (t) {
|
||||
h["X-Emby-Token"] = t;
|
||||
h["X-MediaBrowser-Token"] = t;
|
||||
}
|
||||
return h;
|
||||
}
|
||||
|
||||
async function request(path, options) {
|
||||
const response = await fetch(`${basePath()}${path}`, {
|
||||
cache: "no-store",
|
||||
@@ -89,6 +101,8 @@
|
||||
window.Multilang = {
|
||||
get: (path) => request(path),
|
||||
post: (path, body) => request(path, { method: "POST", body: JSON.stringify(body) }),
|
||||
basePath,
|
||||
authHeaders,
|
||||
splitList,
|
||||
setStatus,
|
||||
chip,
|
||||
|
||||
Reference in new issue
Block a user