mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix post requests
This commit is contained in:
parent
2432c58839
commit
57708e9007
9 changed files with 30 additions and 34 deletions
|
@ -138,14 +138,6 @@
|
|||
}]);
|
||||
}
|
||||
|
||||
function onRetryRequestFail(request) {
|
||||
|
||||
Events.trigger(self, 'requestfail', [
|
||||
{
|
||||
url: request.url
|
||||
}]);
|
||||
}
|
||||
|
||||
self.setRequestHeaders = function (headers) {
|
||||
|
||||
var currentServerInfo = self.serverInfo();
|
||||
|
@ -195,16 +187,22 @@
|
|||
method: request.type
|
||||
};
|
||||
|
||||
var contentType = request.contentType;
|
||||
|
||||
if (request.data) {
|
||||
|
||||
if (typeof request.data === 'string') {
|
||||
fetchRequest.body = request.data;
|
||||
} else {
|
||||
fetchRequest.body = paramsToString(request.data);
|
||||
|
||||
contentType = contentType || 'application/x-www-form-urlencoded';
|
||||
}
|
||||
}
|
||||
|
||||
if (request.contentType) {
|
||||
if (contentType) {
|
||||
|
||||
headers['Content-Type'] = request.contentType;
|
||||
headers['Content-Type'] = contentType;
|
||||
}
|
||||
|
||||
return fetch(request.url, fetchRequest);
|
||||
|
|
|
@ -39,6 +39,6 @@
|
|||
"commit": "cec8e49744a1e18b14a711eea77e201bb70de544"
|
||||
},
|
||||
"_source": "git://github.com/desandro/doc-ready.git",
|
||||
"_target": "~1.0.4",
|
||||
"_target": "1.0.x",
|
||||
"_originalSource": "doc-ready"
|
||||
}
|
|
@ -31,6 +31,6 @@
|
|||
"commit": "34fc5e4a0f252964ed2790138b8d7d30d04b55c1"
|
||||
},
|
||||
"_source": "git://github.com/desandro/get-style-property.git",
|
||||
"_target": "~1.0.4",
|
||||
"_target": "1.x",
|
||||
"_originalSource": "get-style-property"
|
||||
}
|
|
@ -26,14 +26,14 @@
|
|||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"main": "iron-meta.html",
|
||||
"homepage": "https://github.com/PolymerElements/iron-meta",
|
||||
"homepage": "https://github.com/polymerelements/iron-meta",
|
||||
"_release": "1.1.1",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.1.1",
|
||||
"commit": "e171ee234b482219c9514e6f9551df48ef48bd9f"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/iron-meta.git",
|
||||
"_source": "git://github.com/polymerelements/iron-meta.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "PolymerElements/iron-meta"
|
||||
"_originalSource": "polymerelements/iron-meta"
|
||||
}
|
|
@ -54,7 +54,7 @@
|
|||
"tag": "v1.0.8",
|
||||
"commit": "36656916b75a4715b025a03473620002c2650ee8"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/neon-animation.git",
|
||||
"_source": "git://github.com/polymerelements/neon-animation.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "PolymerElements/neon-animation"
|
||||
"_originalSource": "polymerelements/neon-animation"
|
||||
}
|
|
@ -50,7 +50,7 @@
|
|||
"tag": "v1.1.1",
|
||||
"commit": "1bbce220b027dc030b294163f7da6f3e9052ab13"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/paper-input.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "PolymerElements/paper-input"
|
||||
"_source": "git://github.com/polymerelements/paper-input.git",
|
||||
"_target": "^1.0.9",
|
||||
"_originalSource": "polymerelements/paper-input"
|
||||
}
|
|
@ -32,14 +32,14 @@
|
|||
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0"
|
||||
},
|
||||
"ignore": [],
|
||||
"homepage": "https://github.com/polymerelements/paper-ripple",
|
||||
"homepage": "https://github.com/PolymerElements/paper-ripple",
|
||||
"_release": "1.0.5",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.5",
|
||||
"commit": "d72e7a9a8ab518b901ed18dde492df3b87a93be5"
|
||||
},
|
||||
"_source": "git://github.com/polymerelements/paper-ripple.git",
|
||||
"_source": "git://github.com/PolymerElements/paper-ripple.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "polymerelements/paper-ripple"
|
||||
"_originalSource": "PolymerElements/paper-ripple"
|
||||
}
|
|
@ -27,7 +27,7 @@
|
|||
}
|
||||
|
||||
// Request Quota (only for File System API)
|
||||
var requestedBytes = 1024 * 1024 * 200; // 200MB
|
||||
var requestedBytes = 1024 * 1024 * 500; // 500MB
|
||||
var imageCacheDirectoryEntry;
|
||||
var imageCacheFolder = 'images';
|
||||
|
||||
|
@ -46,25 +46,24 @@
|
|||
}, errorCallback);
|
||||
}
|
||||
|
||||
navigator.webkitPersistentStorage.requestQuota(
|
||||
requestedBytes, function (grantedBytes) {
|
||||
navigator.webkitPersistentStorage.requestQuota(requestedBytes, function (grantedBytes) {
|
||||
|
||||
var requestMethod = window.webkitRequestFileSystem || window.requestFileSystem;
|
||||
var requestMethod = window.webkitRequestFileSystem || window.requestFileSystem;
|
||||
|
||||
requestMethod(PERSISTENT, grantedBytes, function (fs) {
|
||||
requestMethod(PERSISTENT, grantedBytes, function (fs) {
|
||||
|
||||
fileSystem = fs;
|
||||
fileSystem = fs;
|
||||
|
||||
createDir(fileSystem.root, imageCacheFolder.split('/'), function (dirEntry) {
|
||||
createDir(fileSystem.root, imageCacheFolder.split('/'), function (dirEntry) {
|
||||
|
||||
imageCacheDirectoryEntry = dirEntry;
|
||||
|
||||
});
|
||||
imageCacheDirectoryEntry = dirEntry;
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
var fileSystem;
|
||||
|
||||
function imageFileStore() {
|
||||
|
|
|
@ -901,7 +901,6 @@
|
|||
shape: getPortraitShape(),
|
||||
showTitle: false,
|
||||
centerText: true,
|
||||
context: context,
|
||||
lazy: true
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue