Predefined Labels

shwetha17

Member
May 24, 2018
785
0
16
I've looked at autotools and lbll-suite and neither of them seems to do what I am looking for.

What I'd like is add a set of predefined labels to the labels right click context menu. I use the same labels all the time, but if I don't have any torrents already setup with those labels I have to type the labels in (and they are kind of long). Is there anything that does this already? Do either of the previously mentioned plugins do it and I don't understand how to set it up?

Is there some snippet of code you can point me to to add options to the labels menu?
 

jith45

Member
May 25, 2018
960
0
16
i'm pretty sure the labeling addns you speak of DO that.

see this screen shot:




that's right clicking an item and letting me label it based on the labels already in use. Also, using auto-tools lets you auto-label torrents based on the download path so it's fairly simple to always have a specific group of labels set.
 

dsouvik215

Member
May 25, 2018
896
0
16
I knew about the option to select labels already in use. But when there are no labels in use that menu only has "New label..." and "Remove Label" I'd like to make it so there are some "sticky" labels that are always on that menu even when no labels are in use.

At the moment I have all my torrents downloading into the same directory, I don't normally add torrents using the webui.
 

das329717

Member
May 25, 2018
928
0
16
ok, i understand what you're saying but even if you don't normally add torrents via the webui you could:


enable auto-watch in some directory:

create subdirectories in that directory like you'd want your labels to be



enable auto-label

Otherwise, you can ask the guy who wrote the 3rd party plugin to add a predifined list for you or open a bounty.
 

jith45

Member
May 25, 2018
960
0
16
I dug into Autotools more and read a couple of the guides on it. I've updated my setup to use the autotools watch folder structure and everything seems to be working now. Thanks for the replies.

The only thing I could think of that would be nice with autotools is if it would auto apply a label (if there isn't one) when you move a torrents datadir. I use Remote Torrent Adder extension for chrome ( https://chrome.google.com/webstore/detail/oabphaconndgibllomdcjbfdghcmenci ) when I do add things from the web. This puts the torrent in the root of my downloading directory. I then move it (using Save to...) and that works fine to later move the completed torrent. But it doesn't auto apply a label. I'm just manually updating the labels for those.
 

somus1735

Member
May 25, 2018
833
0
16
Doable. I will think about that.
But, sorry, i can't make this quickly - you must wait 2-3 weeks, when i returns to home.
 

shwetha17

Member
May 24, 2018
785
0
16
Hey Novik,

Came across this old ticket that's exactly the functionality im after.
I use some automation around lables to determine what happens to a torrent (time to download, where to push it too).
Using rutorrent I classify the torrents using labels, which are picked up using other php scripts (using rutorrent rpc).

However often there are no torrents in a particular label and you end up typing in the labels over and over (human error can also causes typos).

Have had a look at the classes (mostly the frontend js) in the hopes of working this out myself, but I'm no frontend dev.

Doesn't need to actually display the label (with 0 torrents in it), just had to have it as an option in the drop down when you label a torrent.

Is there a simple way to implement this ?
Able to point me in the right direction ?

PS

Happy to do the leg work just a little out of my depth.

Currently on revision 2404 (3.6).
 

dsouvik215

Member
May 25, 2018
896
0
16
Found a way to implement it, but it not preety or upgrade friendly.
Hacked directly into the js/webui.js

After the loop:
Code:
for(var lbl in this.cLabels)

Placed the following:
Code:
/* CUSTOM LABEL FUNCTIONALITY */
if(this.cLabels["down"] == undefined) {
_bf.push(["down (sticky)", (table.selCount > 1) || this.isTorrentCommandEnabled("setlabel",id) ? "theWebUI.setLabel('" + addslashes("down") + "')" : null]);
}
if(this.cLabels["offpeak"] == undefined) {
_bf.push(["offpeak (sticky)", (table.selCount > 1) || this.isTorrentCommandEnabled("setlabel",id) ? "theWebUI.setLabel('" + addslashes("offpeak") + "')" : null]);
}

If there a simpler way to implement this functionality like a plugin that would stand/stay in place over an upgrade ?