chros73 / rtorrent-ps-ch_setup Goto Github PK
View Code? Open in Web Editor NEWAdvanced rTorrent-PS-CH setup
Advanced rTorrent-PS-CH setup
Bind key |
to toggle through selectable themes.
cfg.theme.0
pyro.theme.selected
string
variable method to store the actual filename is being usedbranches
(since we can't write recursive methods in rtorrent config)Note: the latter means that if a new theme is added to /removed from the available selection then the toggle logic has to be modified as well.
Make these 3 themes available for toggling in the following order:
color_scheme256-happy_pastel.rc
color_scheme256-solarized_yellow.rc
color_scheme256-solarized_blue.rc
Modify type of methods in main and config rtorrent files.
Make a comment on current implementation of d.move_data
method (that is used with download.finished
and download.hash_done
events) regarding to stop and start methods in the code to leave it as it is until it's working fine!!!
Current code is:
method.insert = d.move_data, simple|private, "d.directory.set=$d.custom=data_dir;execute=mv,-f,$d.base_path=,$d.custom=data_dir;d.stop=;d.start="
When it's changed to the more sensible form (moving d.stop=
at the beginning) of:
method.insert = d.move_data, simple|private, "d.stop=;d.directory.set=$d.custom=data_dir;execute=mv,-f,$d.base_path=,$d.custom=data_dir;d.start="
it triggers a really nasty bug in tracker controller: there will be stucked http/https requests for newly added torrents, and new requests (announce/scrape) can't be made any more for those torrents, resulting less peers. Restarting the client solves the issue for those torrents.
Interestingly, the other method (d.move_to.helper
) that is using this technique doesn't suffer from this (it's used manually not by the above mentioned events) so it's probably regarding to changing the state of torrents.
A good header of trackers should look like this:
Trackers: [Key: xxxxxxxx] [req ]
The bug results header of trackers like this:
Trackers: [Key: xxxxxxxx] [ ]
Add disable peer exchange to config for the sake of completeness.
Check for pyro command existence.
Slots of a torrent (in both special and other group) didn't get modified in the following cases:
Solution: use event.download.resumed
event to handle all the cases.
"isRunning" is highly unusual, and normally called "status".
https://github.com/chros73/rtorrent-ps/blob/master/ubuntu-14.04/etc/init.d/rtorrent#L107
Remove unused nginx config files: it can lead to a false assumption that this setup uses a webui.
More information here:
rakshasa/rtorrent#384 (comment)
rakshasa/rtorrent@3edeb36
Add support for rtorrent-ps-ch: https://github.com/chros73/rtorrent-ps
Modify sorting Started view: use d.last_active
method instead of the custom variable d.custom=last_active
. It gives more accurate result when peers are connected.
Add more useful config directives into rtorrent config file along with their explanation.
Rename main directories of metafiles (torrent files) to make their naming more meaningful:
.temp
-> .queue
.queue
-> .downloading
.torrent
-> .completed
Add initial config files for ssmtp.conf
and sysctl.conf
.
When a custom variable contains a string, e.g. -1d
then hrf_time
method fails.
Solution: check whether the value is greater than 0
. If not then print the value itself instead of the hrf time.
Original ticket: #7
d.move_to
method.rtorrent-config.rc
main
window sorting into rtorrent-ps.rc
configModify update interval to 12 hours for non-transfarring torrents and polish code.
Originally it was 3 hours (#5).
Refactor delete data functionality and add comments to it.
Using pyroscope idea (pyroscope/rtorrent-ps@d10a598), add those color config files to the setup and put out the existing one as well.
Create a new command called import.pyro.rc
to easily import additional config files from ~/.pyroscope
directory. Usage:
import.pyro.rc="color_scheme8.rc"
Modify comments and refactor 1 method: d.transferring.check
.
Replace multiple time formatting methods with a generalized one: hrf_time
Usage: hrf_time=<> (e.g.: hrf_time=$d.creation_date=)
Result: e.g.: 30/06/2013 23:47:33
Right now auto moving torrents (when download is finished or after a hashcheck) is working fine until a target data or meta file exists. It happens pretty rarely but in this case:
Download registered as completed, but hash check returned unfinished chunks.
So, do NOT move data dir/file NOR metafile anywhere when the target of one of these exist (or both):
Idea: adjust dynamically upload rate and other attributes to favor one special group of torrents over the rest of them
A. Scenario: all we want to do is seeding (unfortunately we have to download before it :) ). We want to distinguished between 2 groups: a special group and the rest of them.
Applying this to downloading is easy but not to seeding.
B. Realization:
slowup
throttle that belongs to the special groupmin_peers
, max_peers
and max_uploads
values for the special group.priority
to high for the special group that will take care of the downloading partslowup
) and set an inital value for it. The special group doesn't use it, the rest of the torrents will use this slowup
throttle forever.^X
and i=
(or just taking a look at the status bar of rtorrent-PS-CH
)adjust_throttle_slowup
and regarding info method: put these into an external shell script (it doesn't affect performance).Handle leftover pid file upon crash in init script: it can happen that we got empty lock file if storage runs out of place and therefore rtorrent crashes.
Add modified pyrocore config file config.ini
and change rtorrent_rc
directive to our new config path: ~/.rtorrent-config.rc
, otherwise pyrocore utils won't work. (See #36)
A way better (non-confusing) name for this repo would be something like "rtorrent-ps-cfg" or "rtorrent-ps-setup", btw.
Bind }
key to toggle unsafe_data
attribute (See #25). (This key should not be easily accessible.)
It sets it in the following order:
,1
(deletable) ,2
(deletable in delete queue)
These didn't affect anything but they were bugs:
ip
commanduntied_dir
method and remove the misunderstood parameterpyro.bin_dir
and pyro.rtorrent_rc
methodspyro_watchdog
schedulingAdd more color configs.
By default, rtorrent only sends scrape request (that can give back the numbers of peers, seeds, downloads for a specific torrent) to trackers when a torrent is added or the client was restarted. More info here: rakshasa/rtorrent#413
Probably this info only cosmetics but good to see these changing.
Use a custom field (tm_last_scrape
) to store the last scrape time to be able to save into session (the inbuilt t.scrape_time_last
property is lost upon reboot).
Let's send these requests regularly:
Add support for .delqueue
directory and refactor corresponding code.
The purpose of delete-queue is to be able to specify torrents (in the form of symlinks pointing to their metafile in this .delqueue
directory) that will be deleted at first by a future queue script.
d.custom=delqueue
d.add_to_delqueue
adds the selected torrent to delqueue only if it has the unsafe_data flagd.remove_from_delqueue
removes the selected torrent from delqueued.fix_delqueue_flag
fixes delqueue flag, apply only if unsafe_data flag and symlink in delqueue dir exists, remove it otherwise .d.custom=delqueue
flag (along with d.custom=unsafe_data
flag) will be visible in the patched rtorrent-ps: chros73/rtorrent-ps-ch#3d.move_to
manual moving method to support this new flag and reorder its parameters:dirname,specialgroup,unsafe_data,delqueue
d.move_to=rotating,1,1,
or d.move_to=rotating,1,1,1
d.move_to=fullseed,1,,
d.move_to=unsafe,,1,
or d.move_to=unsafe,,1,1
d.move_to=others,,,
Add postfix config entry cfg.postfix
that can help to use different config files, scripts with different setups based on naming. It can be an empty string as well.
Refactor the necessary code part.
Rename category directories to be able to have unique first letter.
This first letter will be displayed in the patched rtorrent-ps: chros73/rtorrent-ps-ch#3
import.pyro.rc
method to pyro.import
(see #21)cfg.slowup.d.*
in config: remove the const
type (they can be overridden later in this way, although probably it will never happen)Previously (see #16) the setup used the delqueue
custom variable flag to handle .delqueue
directory.
Change it to be handled by using only 1 custom variable unsafe_data
that can have the following values:
(safe-data) ,1
(unsafe-data) ,2
(in delete-queue).
d.custom=delqueue
custom variable flag completely.d.remove_from_delqueue
method to be able to specify whether unsafe_data
is set to 1 or not set at all.rtorrent-ps-ch
: chros73/rtorrent-ps-ch#15d.move_to
manual moving method to support this change:dirname,specialgroup,unsafe_data
d.move_to=rotating,1,1
or d.move_to=rotating,1,2
d.move_to=fullseed,1,
d.move_to=unsafe,,1
or d.move_to=unsafe,,2
d.move_to=various,,
Migration instructions:
Run the following commands in order, they will care about the rest.
d.multicall2=main,d.fix_delqueue_flag=
: updates the unsafe_data custom variable value for every torrentd.multicall2=main,"d.custom.set=delqueue,"
: deletes the old delqueue custom variable flag for every torrentsession.save=
: saves all the sessionsRefactor rtorrent-ps.rc
config file to make it more meaningful and add/modify more comments.
Also add new default views: started, stopped, incomplete, hashing, leeching.
Rebind keys for our custom views:
<
: datasize>
: uploadeddata%
: ratio@
: categorySee for more info here: rakshasa/rtorrent#448
This particular bug didn't affect this setup (since it never stops a torrent) but it's always good to be prepared the worst case.
Similarly d.base_filename
is empty as well in this case.
Solution:
d.base_filename
with d.name
d.base_path
with a method that will give back the full path of data of a torrent all the time.Comment out unused pyroscope features but leave in the config for reference.
Remove version number from PS config filename, since tags include rtorrent version number.
Rename it to ``.
Apply the new scripting style at some places in main config and correct comments.
Bind key #
to send scrape request manually for any torrent (see #5). (This key should not be easily accessible.)
Add an extra check before deleting data, just in case, especially with this change: #28.
Lower dns timeout to 25 seconds (default is 60) and refactor network related commands.
Add networking tweaks to the setup, including:
network.receive_buffer.size
and network.send_buffer.size
The latter 2 adjust the send and receive buffer size for socket. Disabled by default (0), this means the default is used by OS (you have to modify the system wide settings!!!) (send_buffer_size, receive_buffer_size)
Increasing buffer sizes may help reduce disk seeking, connection polling as more data is buffered each time the socket is written to. It will result higher memory usage (not by rtorrent process!).
These values has to be adjusted in the system sysctl.conf
file as well.
Handle the possibility that d.directory
may have bogus data. (#28)
Expose d.remove_data
method as global instead of private.
Support non-official SSL trackers.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.