add rename override option
This commit is contained in:
@@ -78,8 +78,10 @@ if (request_headers['wtv-request-type'] == 'download') {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case "GET":
|
case "GET":
|
||||||
var get_url = service_name + ":/" + update_list[k].location;
|
var get_url = service_name + ":/" + update_list[k].location + "?";
|
||||||
if (update_list[k].compress === false) get_url += "?dont_compress=true";
|
if (update_list[k].compress === false) get_url += "dont_compress=true&";
|
||||||
|
if (update_list[k].type) get_url += "content_type=" + escape(update_list[k].type) + "&";
|
||||||
|
get_url = get_url.slice();
|
||||||
wtvdl.get(update_list[k].file.replace(diskmap_group_data.base, ""), update_list[k].file, get_url, diskmap_group_name, update_list[k].checksum, update_list[k].uncompressed_size || null, update_list[k].original_filename)
|
wtvdl.get(update_list[k].file.replace(diskmap_group_data.base, ""), update_list[k].file, get_url, diskmap_group_name, update_list[k].checksum, update_list[k].uncompressed_size || null, update_list[k].original_filename)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -93,7 +95,7 @@ if (request_headers['wtv-request-type'] == 'download') {
|
|||||||
if (update_list[k].checksum_match && !force_update) return;
|
if (update_list[k].checksum_match && !force_update) return;
|
||||||
if (!update_list[k].invalid && !force_update) return;
|
if (!update_list[k].invalid && !force_update) return;
|
||||||
if (update_list[k].action == "DELETEONLY") return;
|
if (update_list[k].action == "DELETEONLY") return;
|
||||||
wtvdl.rename(update_list[k].file.replace(diskmap_group_data.base, ""), update_list[k].file.replace(diskmap_group_data.base, ""), diskmap_group_name, diskmap_group_name, update_list[k].original_filename);
|
wtvdl.rename(update_list[k].file.replace(diskmap_group_data.base, ""), update_list[k].file.replace(diskmap_group_data.base, ""), diskmap_group_name, diskmap_group_name, update_list[k].rename || update_list[k].original_filename || null);
|
||||||
});
|
});
|
||||||
|
|
||||||
wtvdl.setGroup(diskmap_group_name, 'ok', diskmap_group_data.version);
|
wtvdl.setGroup(diskmap_group_name, 'ok', diskmap_group_data.version);
|
||||||
|
|||||||
Reference in New Issue
Block a user