Is it possible to have all of my downloads set to one folder and I can sort it to different folders after it finishes downloading?
For example, folder1, folder2, etc?
possible to sort files automatically after downloading?
Re: possible to sort files automatically after downloading?
Yes, with label plugin manually, or automatically with either labelplus plugin(not working with magnets), or just simply using a custom shell script(which most clients support) run from the execute plugin. I have made such a script for when I use qbittorrent-nox, as a labelplus(match-file) replacement(though for my simple use, I only had it set to move video files into my video folder and get subs from opensubtitles if available and remove non-video crap like samples/nfo's and also the parent-folder.)
Re: possible to sort files automatically after downloading?
Does label plugin work with magnet torrents?
Re: possible to sort files automatically after downloading?
Yes, but the label plugin works by you manually selecting the label you want by right-clicking each torrent and then you can have separate label-folders I believe(in regular label plugin). In the thread for labelplus, I have also posted a workaround for making labelplus work with magnets, by using a magnet2torrent converter utility. If you don't need automatic labeling and is OK by right-clicking each torrent manually, then labelplus works fine for magnets also.
Re: possible to sort files automatically after downloading?
I really interested with your script, could you please share it? Thanks a lot.mhertz wrote:Yes, but the label plugin works by you manually selecting the label you want by right-clicking each torrent and then you can have separate label-folders I believe(in regular label plugin). In the thread for labelplus, I have also posted a workaround for making labelplus work with magnets, by using a magnet2torrent converter utility. If you don't need automatic labeling and is OK by right-clicking each torrent manually, then labelplus works fine for magnets also.
The LabelPlus works on current torrents no matter it is magnet or not. And for new magnet torrent, you have to right click and assign a label for it. If the magnet has the info of file in the header, then LabelPlus will automatically add label for it (rarely happens).newdeluge wrote:Does label plugin work with magnet torrents?
Patreon: http://patreon.com/deluge_cas
Contact me: http://forum.deluge-torrent.org/ucp.php?i=pm&mode=compose&u=129152
Contact me: http://forum.deluge-torrent.org/ucp.php?i=pm&mode=compose&u=129152
Re: possible to sort files automatically after downloading?
Of course I can share my scripts, but sorry what is it you're after specifically? From your quote you sound interested in the magnet2torrent converter script which isn't made by me, and I made instructions in the labelplus thread's last post on how to use. Or was the quote just the wrong one, and you want the post-processing script I mentioned earlier in this thread I used with qbittorrent-nox for labelplus match-file-alike functionality?
Re: possible to sort files automatically after downloading?
Oops did I? Yes, I did quote the wrong ones, how fool I am . I meant this quote:mhertz wrote:... Or was the quote just the wrong one, and you want the post-processing script I mentioned earlier in this thread I used with qbittorrent-nox for labelplus match-file-alike functionality?
I really interested with the get subs and remove unnecessary files apart from the videomhertz wrote:... I have made such a script for when I use qbittorrent-nox, as a labelplus(match-file) replacement(though for my simple use, I only had it set to move video files into my video folder and get subs from opensubtitles if available and remove non-video crap like samples/nfo's and also the parent-folder.)
Patreon: http://patreon.com/deluge_cas
Contact me: http://forum.deluge-torrent.org/ucp.php?i=pm&mode=compose&u=129152
Contact me: http://forum.deluge-torrent.org/ucp.php?i=pm&mode=compose&u=129152
Re: possible to sort files automatically after downloading?
As i've changed over to deluge, and like my script more than using labelplus(with magnet2torrent workround), because of the added cleanup and subchecks, then I've migrated the script over to use deluge's parameters, as they differ from qbittorrent-nox's.
The script removes crap by deleting possible "*SAMPLE*" files and copying rest video files over to my video folder and getting subs there if available and deleting the parent folder if available.
I don't have a very big video folder, since I don't keep things i've already seen and so prefer not having e.g. different episodes in both folders and single files, which fucks up sorting in video players and easy overview. It is very easy to change the script to not remove the possible parent folder and issue some extra rm commands to nfo's, txt's etc, to further cleanup.
Lastly, the subchecker I use is a single small python file with no extra needed deps to install, and to be placed somewhere under PATH + 'chmod +x' it, and is checking opensubtitles for matches from a checksum so 100% exact(but optionally falls back to filename matching if no matches, which is enabled by default). I also change a setting in the file itself from auto to off, so downloaded subs always are named after the video and not gets a language suffix. I use '-l eng -l swe -l dan' instead of the more usual -l dan,swe,eng', because the later sometimes doesn't respect the language order(if only one language has a hash provided it's always taken no matter if last in order), and I instead want my native language(s) preferably, with english only as fallback, no matter if there isn't a hash provided for my native language(s), and the previous mentioned setting disabled, makes each sub language downloaded to just overwrite the previous sub, hence the opposite order there. You can also set username/password for opensubtitles as options in the file itself if wanted, but that's optional and I don't bother(you're then restricted to max 200 subs a day and a very short 2 sec add, in the beginning possibly, which the free registering at opensubtitles removes). Here's the link(you only need the py file): https://github.com/emericg/OpenSubtitlesDownload
You could also use periscope, which is another python subchecker supporting more providers than opensubtitles and just have 1 extra python dependency, though opensubtitles is so big(biggest I believe) and so I thought if it wasen't there then it probably wasen't available anyway. Also, periscope didn't work for me in that it didn't download subs in my selected language for some reason in my brief tests with it. There's others too, like subliminal etc.
postproc: (It's not very elegant, and could be written much better )
Edit: I have also defined my core.conf to let deluge remove downloads when they finish downloading, hence I can mv the files instead of cp'ing them. I'm using public trackers and upload during download, though am leery about seeding afterwards on public trackers, despite using "protection", but if libtorrent gets a bug regarding it's force_proxy setting, or if the provider was sued and logs restored somehow - I know the latter is pretty much an impossible scenario to unravel, but nonetheless, that's my reasoning...
Btw, I use this script as handler for magnets and torrents, so when clicking a magnet or torrent in my browser, then this deluge-run script is run in the background: (and I check progress if needed with 'deluge-console info' from a terminal, though a sound is played anyway when all downloads are finished) I made it because deluge don't support stopping the daemon after downloads finish(not from plugins either), which I liked from qbittorrent-nox:
The script removes crap by deleting possible "*SAMPLE*" files and copying rest video files over to my video folder and getting subs there if available and deleting the parent folder if available.
I don't have a very big video folder, since I don't keep things i've already seen and so prefer not having e.g. different episodes in both folders and single files, which fucks up sorting in video players and easy overview. It is very easy to change the script to not remove the possible parent folder and issue some extra rm commands to nfo's, txt's etc, to further cleanup.
Lastly, the subchecker I use is a single small python file with no extra needed deps to install, and to be placed somewhere under PATH + 'chmod +x' it, and is checking opensubtitles for matches from a checksum so 100% exact(but optionally falls back to filename matching if no matches, which is enabled by default). I also change a setting in the file itself from auto to off, so downloaded subs always are named after the video and not gets a language suffix. I use '-l eng -l swe -l dan' instead of the more usual -l dan,swe,eng', because the later sometimes doesn't respect the language order(if only one language has a hash provided it's always taken no matter if last in order), and I instead want my native language(s) preferably, with english only as fallback, no matter if there isn't a hash provided for my native language(s), and the previous mentioned setting disabled, makes each sub language downloaded to just overwrite the previous sub, hence the opposite order there. You can also set username/password for opensubtitles as options in the file itself if wanted, but that's optional and I don't bother(you're then restricted to max 200 subs a day and a very short 2 sec add, in the beginning possibly, which the free registering at opensubtitles removes). Here's the link(you only need the py file): https://github.com/emericg/OpenSubtitlesDownload
You could also use periscope, which is another python subchecker supporting more providers than opensubtitles and just have 1 extra python dependency, though opensubtitles is so big(biggest I believe) and so I thought if it wasen't there then it probably wasen't available anyway. Also, periscope didn't work for me in that it didn't download subs in my selected language for some reason in my brief tests with it. There's others too, like subliminal etc.
postproc: (It's not very elegant, and could be written much better )
Code: Select all
#!/bin/bash
shopt -s extglob globstar
if [ -d "$3/$2" ]; then
if [[ $(ls "$3/$2"/**/*(*.mkv|*.mp4|*.avi|*.MKV|*.MP4|*.AVI)) ]]; then
rm "$3/$2"/**/*sample*
rm "$3/$2"/**/*SAMPLE*
rm "$3/$2"/**/*Sample*
OpenSubtitlesDownload.py -a -l eng -l swe -l dan "$3/$2"/**/*
mv "$3/$2"/**/*(*.mkv|*.mp4|*.avi|*.MKV|*.MP4|*.AVI) video
mv "$3/$2"/**/*(*.srt|*.SRT) video
rm -rf "$3/$2"
fi
else
if [ ${2: -4} == ".mkv" ]; then
mv "$3/$2" video
OpenSubtitlesDownload.py -a -l eng -l swe -l dan "video/$2"
elif [ ${2: -4} == ".mp4" ]; then
mv "$3/$2" video
OpenSubtitlesDownload.py -a -l eng -l swe -l dan "video/$2"
elif [ ${2: -4} == ".avi" ]; then
mv "$3/$2" video
OpenSubtitlesDownload.py -a -l eng -l swe -l dan "video/$2"
elif [ ${2: -4} == ".MKV" ]; then
mv "$3/$2" video
OpenSubtitlesDownload.py -a -l eng -l swe -l dan "video/$2"
elif [ ${2: -4} == ".MP4" ]; then
mv "$3/$2" video
OpenSubtitlesDownload.py -a -l eng -l swe -l dan "video/$2"
elif [ ${2: -4} == ".AVI" ]; then
mv "$3/$2" video
OpenSubtitlesDownload.py -a -l eng -l swe -l dan "video/$2"
fi
fi
Btw, I use this script as handler for magnets and torrents, so when clicking a magnet or torrent in my browser, then this deluge-run script is run in the background: (and I check progress if needed with 'deluge-console info' from a terminal, though a sound is played anyway when all downloads are finished) I made it because deluge don't support stopping the daemon after downloads finish(not from plugins either), which I liked from qbittorrent-nox:
Code: Select all
#!/bin/bash
pgrep deluged || deluged
sleep 2
deluge-console add $1
pgrep deluge-down && exit
echo "#!/bin/bash" > /tmp/deluge-down
echo 'DL=$(deluge-console info | grep Downloading)' >> /tmp/deluge-down
echo 'while [ "$DL" != "" ]; do' >> /tmp/deluge-down
echo 'DL=$(deluge-console info | grep Downloading)' >> /tmp/deluge-down
echo "sleep 30" >> /tmp/deluge-down
echo "done" >> /tmp/deluge-down
echo "pkill -9 deluged" >> /tmp/deluge-down
echo "rm ~/Downloads/*.torrent" >> /tmp/deluge-down
echo "mpv /usr/share/sounds/alsa/Noise.wav" >> /tmp/deluge-down
echo "rm /tmp/deluge-down" >> /tmp/deluge-down
chmod +x /tmp/deluge-down
/tmp/deluge-down&