Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
groups.lbl["lbl_" + encodeID(lbl)] = 1;
});
}
// Categories: Downloading/Completed
if (tor[CONST.TORRENT_PROGRESS] < 1000) {
groups.cat["cat_dls"] = 1;
}
else {
groups.cat["cat_com"] = 1;
}
// Categories: Active/Inactive
if (
(tor[CONST.TORRENT_DOWNSPEED] > (this.settings["queue.slow_dl_threshold"] || 103)) ||
(tor[CONST.TORRENT_UPSPEED] > (this.settings["queue.slow_ul_threshold"] || 103))
) {
groups.cat["cat_act"] = 1;
}
else {
groups.cat["cat_iac"] = 1;
}
// Update group counts
// TODO: Move this elsewhere!
(function(groups, oldGroups) {
if (!oldGroups) {
Object.each(groups.cat, function(_, cat) {
++this.categories[cat];
}, this);
}
else {
// dl / complete
if(tor[CONST.TORRENT_COMPLETE])
{
groups.cat["cat_com"] = 1;
}
else
{
groups.cat["cat_dls"] = 1;
}
// active / inactive
if((tor[CONST.TORRENT_DOWNSPEED] > (this.settings["queue.slow_dl_threshold"] || 103)) ||
(tor[CONST.TORRENT_UPSPEED] > (this.settings["queue.slow_ul_threshold"] || 103)))
{
groups.cat["cat_act"] = 1;
}
else
{
groups.cat["cat_iac"] = 1;
}
// update group counts
// TODO: Move this elsewhere!
(function(groups, oldGroups) {
if (!oldGroups)
{
Object.each(groups.cat, function(_, cat)
{
++this.categories[cat];