Plugin: goto

peshua19

Member
May 25, 2018
897
0
16
goto - Add custom buttons to the ruTorrent toolbar.
xlh08n.png

I have very basic javascript knowledge at best (I can read it) so this is a very simple plugin (if it can even be called that) but I use this little addition myself so I figured I might share it.



How to install:
You can get the files here.

  • 1. Extract to plugins dir
  • 2. By default you'll have the same 3 buttons, edit init.js to change the destination URL's

Opt: To change the text, look at the lang files. (Well, "en", I didn't do the changes on the others)
Opt: To change the icons, either change the image files or change the path to the file in goto.css
Opt: To add more icons, add more entries in init.js and goto.css and matching icons to images/


And there you have it smiley.gif
For what it's worth I'm going to dump the codes in case archive is pulled or someone just wants to take a peak:


Code: (init.js)
plugin.loadMainCSS();
plugin.loadLang(true);

plugin.onLangLoaded = function()
{
this.addButtonToToolbar("gotoShared", theUILang.gotoShared, "location.href='http://WWW.DOMAINE.COM/PATH/TO/RUTORRENT_1/'", "help");
this.addButtonToToolbar("gotoTV", theUILang.gotoTV, "location.href='http://WWW.DOMAINE.COM/PATH/TO/RUTORRENT_2/'", "help");
this.addButtonToToolbar("gotoMusic", theUILang.gotoMusic, "location.href='http://WWW.DOMAINE.COM/PATH/TO/RUTORRENT_3/'", "help");
this.addSeparatorToToolbar("help");
}
Code: (goto.css) [Select]
div#gotoShared {
background: transparent url(./images/shared.png) no-repeat;
}

div#gotoTV {
background: transparent url(./images/tv.png) no-repeat;
}

div#gotoMusic {
background: transparent url(./images/music.png) no-repeat;
}


Now you can add buttons to your rutorrent too cheesy.gif



Background:
I have multiple rtorrent instances running, one for TV, one for Music, one for Misc. That way the small stuff, the bigger stuff and the daily TV downloads are all separate and have different seeding rules etc. I know it can be done other ways but this works for me. Having to change username/password for every instance is ridiculous so they're all nested:

Misc: /var/www/rutorrent/
TV: /var/www/rutorrent/tv/
Music: /var/www/rutorrent/music/

What I've done is created some buttons in the menu bar which allow switching between the instances. These are just basic hyperlinks but they work.
To be honest my main reason for sharing this is also educational as this is probably a nice first step for someone trying to add some functionality without knowing much about rutorrent.