mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-12 16:23:07 -07:00
Add save path and editing to WebUI new category dialog
This commit is contained in:
parent
a0e6007fc1
commit
63c53766b4
12 changed files with 197 additions and 71 deletions
|
@ -316,19 +316,26 @@ window.addEvent('load', function() {
|
|||
syncMainDataLastResponseId = response['rid'];
|
||||
}
|
||||
if (response['categories']) {
|
||||
response['categories'].each(function(category) {
|
||||
var categoryHash = genHash(category.name);
|
||||
category_list[categoryHash] = {
|
||||
name: category.name,
|
||||
savePath: category.savePath,
|
||||
torrents: []
|
||||
};
|
||||
});
|
||||
for (var key in response['categories']) {
|
||||
var category = response['categories'][key];
|
||||
var categoryHash = genHash(key);
|
||||
if (category_list[categoryHash] !== undefined) {
|
||||
// only the save path can change for existing categories
|
||||
category_list[categoryHash].savePath = category.savePath;
|
||||
}
|
||||
else {
|
||||
category_list[categoryHash] = {
|
||||
name: category.name,
|
||||
savePath: category.savePath,
|
||||
torrents: []
|
||||
};
|
||||
}
|
||||
}
|
||||
update_categories = true;
|
||||
}
|
||||
if (response['categories_removed']) {
|
||||
response['categories_removed'].each(function(category) {
|
||||
var categoryHash = genHash(category.name);
|
||||
var categoryHash = genHash(category);
|
||||
delete category_list[categoryHash];
|
||||
});
|
||||
update_categories = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue