[Script] Automated moving of downloads for SB and CP to post process - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: Supplementary Tools for Kodi (https://forum.kodi.tv/forumdisplay.php?fid=116) +--- Thread: [Script] Automated moving of downloads for SB and CP to post process (/showthread.php?tid=141946) |
[Script] Automated moving of downloads for SB and CP to post process - wjbeckett - 2012-10-04 Hi All, Sorry if the title confuses you however I had a need to write a script for moving my completed downloads to specific locations so SickBeard and CouchPotato could post process the files. I was originally doing this via uTorrent but having to manually set labels was becoming cumbersome, especially when I wasn't always around a computer to change the label if a torrent auto started. So I began seeking alternative ways to make this process completely automated. I am happy to say I have finally written a script to make this work! Here's a little information on my setup. I have uTorrent, SickBeard and CouchPotato all running as a service on my HTPC. SB and CP monitor locations for files to post process (D:\Downloads\TV SHows, and D:\Downloads\Movies). SickBeard and CouchPotato snatch the files and send the .torrent files to a blackhole location for uTorrent to start the downloads. uTorrent then spits the completed downloads to a specific location (D:\torrents). Once the torrent is completed I have setup uTorrent to run a program - my VBScript, which moves files to the SB and CP processing directories (D:\Downloads\TV SHows, and D:\Downloads\Movies) by using keywords in the file or folder name. For example:- in the "D:\torrents" folder (the completed downloads folder) I have the following files and folders Rock.of.Ages.720p - This is a movie FOLDER with an MKV,mp4,avi file within it. The.Hangover.2.(2011).DVDRip.XviD-MAXSPEED.avi - This is movie FILE New.Girl.S02E01.HDTV - This is a TV Show FOLDER with and mp4,avi,mkv file within it. White.Collar.S04E10.HDTV.mp4 - this is a TV Show FILE. My script scans the file and folder names for key words to separate TV Shows from the rest. Currently, the key words I am using is "hdtv" and "s0" seeing as most tv shows have either one or both of the keywords in the file or folder name. For all other files it classifies them as movies. So the outcome of the above files is that it will move the "Rock.of.Ages.720p" folder and "The.Hangover.2.(2011).DVDRip.XviD-MAXSPEED.avi" file to D:\Downloads\Movies for CouchPotato to process; and the "New.Girl.S02E01.HDTV" folder and "White.Collar.S04E10.HDTV.mp4" file to the "D:\Downloads\TV Shows" directory for SickBeard to process. If anyone has any need for the same sort of functionality please feel free to use my script! The script is below but here is the link to the moveTorrentScript if you would like to download it. :-) If anyone has any questions about the script or wants a better explanation please let me know. Thanks, Will. Code: '==================================================================== |