mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
refactor and update
This commit is contained in:
@@ -40,6 +40,20 @@ function torrent(action, link, hash, title, poster, save, done, fail){
|
|||||||
|
|
||||||
//
|
//
|
||||||
|
|
||||||
|
function sendApi(action, obj, path, done, fail){
|
||||||
|
obj[action]=action;
|
||||||
|
var req = JSON.stringify(obj);
|
||||||
|
$.post(path,req)
|
||||||
|
.done(function( data ) {
|
||||||
|
if (done)
|
||||||
|
done(data);
|
||||||
|
})
|
||||||
|
.fail(function( data ) {
|
||||||
|
if (fail)
|
||||||
|
fail(data);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function humanizeSize(size) {
|
function humanizeSize(size) {
|
||||||
if (typeof size == 'undefined' || size == 0)
|
if (typeof size == 'undefined' || size == 0)
|
||||||
return "";
|
return "";
|
||||||
|
|||||||
Reference in New Issue
Block a user