This performs the RPC request "torrent-start-now", which allows starting torrents even if they're currently in waiting state due to full download queue.
Signed-off-by: Jonathan McCrohan <email@example.com>
Fix up header/footer to match rest of distribution's bash completion scripts in /usr/share/bash-completion/completions. Signed-off-by: Jonathan McCrohan <firstname.lastname@example.org>
Whenever you tried to tab complete a folder that either did not exist or you did not have access permissions, a exception was raised by os.listdir and was not treated.
I don't really know what I'm doing, but it looks like there aren't any exceptions anymore when completing non-ascii character filenames. I guess making sure that the 'input' variable is always unicode, not str, did the trick, so len(input) now counts unicode characters instead of ascii characters (bytes).
It would not propperlly be completed if the path had the characters '[', ']', '?' or '*', as that would be interpreted as part of a regular expression. Brackets are specially common on anime torrents.
Since some users prefer to save incomplete files in a separate directory ('incomplete-dir-enabled' set to true), this will make sure to check that directory as well. In addition, it will also append '.part' to the filename if the user has the 'rename-partial-files' enabled in transmission. No check is made if those options are actually enabled, because I thought it would add unneeded complexity. I hope nothing bad will happen.
Since adding the "open file from transmission-remote-cli" feature, there has been a commit which made this feature a bit annoying for me since opening a file would've meant that transmission-remote-cli should stop until the process running using the selected file would have ended. Therefore, if 'file_open_in_terminal' is set to False, 'xdg-open <file>' will start in the background, independent from the terminal, with stderr and stdout redirected to /dev/null. The 'transmission-remote-cli' process will not be stopped. By default, this option is disabled (set to True).
…torrents per page
This restores the previous behaviour (changed in 6c5af1b). See discussion on fagga/transmission-remote-cli#102. Also adds abilitty to move torrent to top or bottom of the queue.
Also added the datetime import I forgot on my earlier commit.