Mobile version of ruTorrent
At my place there is a mini-server made from an old laptop. One of the main destinations is torrents. As a client, rTorrent + rutorrent is used. In this bunch, everything suited me except one thing: the inability to use rutorrent from a smartphone. There are two reasons for this:
Having suffered a bit, reading the official forum, I realized that the developers are not going to add support for mobile devices yet and I decided to fix the situation myself.
One of the benefits of rutorrent is its extensibility with plugins. Actually, I wrote a plug-in that completely changes 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 you can see in the screenshots, the interface has been completely redone for ease of use on small displays. Old naturally does not disappear. The plug-in itself determines by the “User Agent” when it needs to be turned on, or you can turn the mobile interface on and off by changing the URL. Details in the "use" section.
Twitter Bootstrap was used to create the interface. For auto-detection, a script from the site http://detectmobilebrowser.com/ was used .
The mobile version does not fully implement the functionality of the standard version. Here is a list of available features:
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 select the folder to download using the file browser
All settings are stored in init.js. In total, at the moment there are only two parameters to change:
1. plugin.enableAutodetect - browser auto-detection (mobile or not). If you disable then the mobile interface can be enabled only by changing URL
2. plugin.eraseWithDataDefault - “delete with data”, the default value. Three values are possible:
3. plugin.navBarToBottom - position of the control panel. If true (by default) - then at the bottom
4. plugin.getDirEnabled - if true (by default) then support for the _getdir plugin is enabled
If confirmation of torrent deletion 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.
If browser auto-detection is enabled, then the plugin starts working automatically when the page loads. You can also forcefully launch 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 version with github and are updated on time. List of changes:
In general, the plugin was created primarily for myself, so the functions that were necessary for me were added, 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 reviews, otherwise the discussion somehow does not go on in the topic on the official forum.
- Strong dependence on the right mouse button. It is treated with the ipad plugin, but how can we conclude from the plugin name this option is suitable only for tablets because of the second reason.
- 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 bit, reading the official forum, I realized that the developers are not going to add support for mobile devices yet and I decided to fix the situation myself.
One of the benefits of rutorrent is its extensibility with plugins. Actually, I wrote a plug-in that completely changes 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 you can see in the screenshots, the interface has been completely redone for ease of use on small displays. Old naturally does not disappear. The plug-in itself determines by the “User Agent” when it needs to be turned on, or you can turn the mobile interface on and off by changing the URL. Details in the "use" section.
Twitter Bootstrap was used to create the interface. For auto-detection, a script from the site http://detectmobilebrowser.com/ was used .
Opportunities
The mobile version does not fully implement the functionality of the standard version. Here is a list of available features:
- View the current torrents (with filtering for downloads and finished ones, as well as for the Mateks), their status and detailed information about them
- View and edit tags
- Changing global download and upload speed limits
- Torrent Tracker List and File Browser
- Adding new torrents both with a file and with magnet links (including the choice of a folder for downloading due to the _getdir plugin
- Removing 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 select the folder to download using the file browser
Customization
All settings are stored in init.js. In total, at the moment there are only two parameters to change:
1. plugin.enableAutodetect - browser auto-detection (mobile or not). If you disable then the mobile interface can be enabled only by changing URL
2. plugin.eraseWithDataDefault - “delete with data”, the default value. Three values are possible:
- undefined - do not delete data for the first time. In subsequent ones, the previous value is saved until the first page reload
- false (default) - do not always delete by default
- true - always delete by default
3. plugin.navBarToBottom - position of the control panel. If true (by default) - then at the bottom
4. plugin.getDirEnabled - if true (by default) then support for the _getdir plugin is enabled
If confirmation of torrent deletion 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, then the plugin starts working automatically when the page loads. You can also forcefully launch 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 version with github and are updated on time. List of changes:
- The control panel can now be placed below or above, depending on the settings
- Added auto-detection support 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 downloaded or what error occurred
- Added support for the _getdir plugin - now you can select the folder where to download torrent using a small file browser
Afterword
In general, the plugin was created primarily for myself, so the functions that were necessary for me were added, 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 reviews, otherwise the discussion somehow does not go on in the topic on the official forum.