At my home there is a mini-server made from an old laptop. One of the main purposes is torrents. The client uses rTorrent + rutorrent. In such a bundle, everything suited me except one thing: the impossibility of using the rutorrent from a smartphone. There are two reasons for this:
- Strong dependence on the right mouse button. It is treated with the help of the ipad plug-in, but how can you conclude from the name of the plug-in this option is only suitable for tablets because of the second reason.
- The inability of the interface to small displays. An example can be seen in the screenshot below (screenshot taken on HTC Incredible S. Resolution: 800x480, screen size: 4 ")

Having suffered a little by reading the official forum, I realized that the developers are not going to add support for mobile devices and I decided to correct the situation myself.
One of the benefits of rutorrent is extensibility with plugins. Actually, I wrote a plugin completely changing the interface for mobile devices. Here's what happened:
')



If you are interested in this plugin, here is a
link to the archive with the latest version. The current development version is available on
github .
As seen in the screenshots, the interface has been completely reworked for ease of use on small displays. Old naturally does not disappear anywhere. The plugin itself determines by the “User Agent” when it is necessary to turn on, or you can turn the mobile interface on or off by changing the URL Details in the section "use".
Twitter Bootstrap was used to create the interface. For auto-detection, a script from the site
http://detectmobilebrowser.com/ was used .
Opportunities
Mobile version does not fully implement the functionality of the standard version. Here is a list of available features:
- View current torrents (with filtering for downloadable and completed, as well as by matekam), their status and detailed information about them
- View and edit tags
- Changing global speed limits on download and upload
- List of torrent trackers and file browser
- Adding new torrents both by file and by magnet links (including the choice of a folder for downloading due to the _getdir plugin
- Removal of torrents (including with data)
Installation
Everything is as usual for rutorrent plugins: just copy the folder with the plugin to the rutorrent \ plugins \ folder.
If you want to delete torrents along with the data, then you also need to install the erasedata plugin, which can be downloaded from the official rutorrent page.
You will also need the _getdir plugin if you want to choose a folder for downloading using the file browser.
Customization
All settings are stored in the file init.js. There are currently only two parameters to change:
1. plugin.enableAutodetect - automatic detection of the browser (mobile or not). If you disable the mobile interface can be enabled only by changing the URL
2. plugin.eraseWithDataDefault - “delete with data”, default value. Three values ​​are possible:
- undefined - do not delete data for the first time. Subsequent retains the previous value until the first page reload.
- false (default) - the default is always not to delete
- true - always delete by default
3. plugin.navBarToBottom - the position of the control panel. If true (by default), then below
4. plugin.getDirEnabled - if true (the default) then support for the _getdir plugin is enabled
If the removal of the torrent is disabled in the rutorrent settings, then the mobile version will behave the same. The decision to delete data is made depending on the plugin.eraseWithDataDefault parameter.
Using
If browser auto detection is enabled, the plugin starts working automatically when the page loads. You can also force the mobile version by adding the line "? Mobile = 1" at the end of the address.
UPD:Rolled out a new update. Now the plugin is no longer beta, but has version 0.9. All innovations could already be tried by those who use the github version and are updated on time. List of changes:
- The control panel can now be placed at the bottom, or at the top, depending on the settings.
- Added support for auto-detection on tablets
- It is possible to filter torrents not only by their status (downloaded or downloaded), but also by tags
- After adding a new torrent, its status is now written (whether it was loaded or what error occurred
- Added support for _getdir plugin - now you can select the folder where to download the torrent using a small file browser
Afterword
In general, the plugin was created primarily for myself, so that I added the functions that are necessary for me, but I am ready to modify the plugin in such a way that it would benefit not only me. In the comments I am waiting for suggestions, error messages and just feedback, but the discussion on the official forum is somehow not going.