(2012-10-30, 17:30)Lord_Kami Wrote: Found a bug in the latest stable version. Multi volume rar-archives where files are named .*part[number].rar, sorttv extracts each and every .rar resulting in a very time and space consuming operation.
Hi, I am new to this script and Ive been having a few problems and hence have a few questions. I have been playing around with linux for a little while but Im still a novice with Google being my best friend. After my list of problems you will probably think why bother but the lure of completely automating my system and the fact Im always up for a challenge has me wanting to get it all sorted.
The plan is to run the script when a torrent completes in transmission but for now I just have it sorting my existing download directory.
Ill start with the same problem Lord_Kami is having. Any folder with multipart rars is being unrared times how ever many parts there are so I completely agree its a very time and space consuming operation.
Another problem Im having has been mentioned before in this thread but Im not sure how to fix it. I have both compressed and normal files in my download location and if I set sort-by=COPY so I can keep seeding it leaves a (extracted by sorttv) folder that Transmission wont remove when the torrent ends. I have tried to put (extracted by sorttv) in the delete section of the config but I cant get the script to delete it. My current work around that I came up with is two copies of the script with different configs, one that processes normal files and copies them and the other that processes rars and moves them. I made a basic shell script that calls the normal/copy one first and when that finishes the next rar/move one does any that the first one didnt do. This works but I know it is far from ideal and I would rather have it setup so the one script works by copying all actual files (including whats in the rars) but after a successful copy deleting the rar files it creates and I was wondering what it is exactly I have to put in the script config to delete them?
Also when I run the script back over the same folder and files it seems to uncompress them again before it realises that its already done that file and proceeds to skip it. Thats also putting a lot of unnecessary load on my server along with it processing multipart rars individually. I can see in verbose mode that it can see the file name before it attempts to uncompress it so it should compare then and not after. If my planned integration with transmission works that should take care of it but it might be something that needs looking at. Now to my next question,
When Transmission finishes downloading it can call a script and pass on a few parameters including the downloaded torrents name. If I can use the torrent name when calling the script for eg. perl /path/to/script/sorttv.pl "$TORRENT_NAME" would that work to call the script on that file? I think thats the right way to pull the file name out but if I try to call the script onto an actual file name as a test with no other parameters it makes a folder in the source files directory and not in the destination that I put in the config. Surely I dont have to put the paths to each directory when I call the script? I saw in the readme that you can do perl sorttv.pl --directory-to-sort=/home/me/Downloads --directory-to-sort-into=/home/me/Videos/TV --non-episode-dir=/home/me/Videos/Non-episodes but what about movies or music etc?
If I use the argument file-to-sort= "$TORRENT_NAME" in the config and then just Transmission to call perl /path/to/script/sorttv.pl when a download completes would that work or would it still just put it into the directory where the source file came from?
At the moment the script cant seem to find specials against standard scene release names on the TvDb such as Show Name.S01.Special.Episode title.HDTV.x264-Scene.Group.mp4. I have all the matching and renaming options still at default and I can find it manually on the TvDb listed as a special in Season 1. It picked up the normal episodes ok so I dont know what to change there or if thats a bug.
I realise Im asking for a fair bit here but hopefully I can help somewhat aswell.
I hope I have explained myself properly.
Thanks so much for any help.
edit: just trying to think of different ways of doing what I want