2011-02-24, 15:46
The problem I had when I started writing this script is that I couldn't find any unpacker that would extract and delete archives for a torrent after a certain period of time or after a certain seed ratio had been reached.
This script will wait for a set amount of hours when a torrent finishes before extracting, deleting archives, moving files into its right location, scraping with EMM or EMM-R (command-line) AND notify XBMC of your new download and update its library.
Fully automated media center, in just a single batch. No need for eventghost, the renamer or all that jazz.
This script will NOT stop your torrents, but they will probably fail after it has deleted the archive.
I'm downloading my TV-Series with RSS-feeds in uTorrent.
They are saved into:
K:\TV-Series\Supernatural\Season 06\Supernatural.S06E04.HDTV.XviD-REL\*.rar
But afterwards I have to extract the contents of the rar, and move it one folder up, like this:
K:\TV-Series\Supernatural\Season 06\supernatural.s06e04.hdtv.xvid-rel.avi
This script does that job automatically, among with some other things.
The script will also work for movies, with multiple subdirectories.
Lets say you have it like this:
K:\Movies\Awesome.Movie.DVDRip.XviD-REL\CD 1\*.rar
K:\Movies\Awesome.Movie.DVDRip.XviD-REL\CD 2\*.rar
This script will then extract from both those folders into its parent folder. Like this:
K:\Movies\Awesome.Movie.DVDRip.XviD-REL\awesome.movie.cd1.dvdrip.xvid-rel.avi
K:\Movies\Awesome.Movie.DVDRip.XviD-REL\awesome.movie.cd2.dvdrip.xvid-rel.avi
It also works for single file movies.
From:
K:\Movies\Awesome.Movie.DVDRip.XviD-REL\*.rar
Into:
K:\Movies\Awesome.Movie.DVDRip.XviD-REL\awesome.movie.dvdrip.xvid-rel.avi
The script will try to delete these files and folders:
"<download_path>\CD{1-4}\"
"<download_path>\CD {1-4}\"
"<download_path>\Sample\"
"<download_path>\*.rar"
"<download_path>\*.sfv"
"<download_path>\*.r0{1-9}"
"<download_path>\*.r{10-99}"
Tested with uTorrent v2.2 Build 23703, Windows Server 2008 R2 x64.
!!! uTorrent v3.x has been reported to not work !!!
System Requirements
* uTorrent Version 2.2 (build 21882+)
* timeout (Windows Vista/7)
* WinRAR (with Command-Line unrar.exe)
* XBMC v10 (Dharma)
* EMM/EMM-r
Timeout
A new command in Vista/7 is "timeout". It will cause the command processor to wait for a specified number of seconds or until a key is pressed.
Website
Always check the website, I will not keep this post updated if it doesn't involve a major change
http://bit.ly/g26fH6#autoextract
Edit config.cmd to suit your needs.
Call the script from within uTorrents GLOBAL settings.
Options, Preferences, Advanced, Run Program, Run this program when a torrent finishes:
uTorrent will parse it like this:
A movie download, labeled "Movie":
A tv-show download, labeled "TV-Show":
EDIT: You know what they say, a picture says more than a thousand words
Notification from above script when a new movie is added
Notification from above script when a new episode is added
This script will wait for a set amount of hours when a torrent finishes before extracting, deleting archives, moving files into its right location, scraping with EMM or EMM-R (command-line) AND notify XBMC of your new download and update its library.
Fully automated media center, in just a single batch. No need for eventghost, the renamer or all that jazz.
This script will NOT stop your torrents, but they will probably fail after it has deleted the archive.
I'm downloading my TV-Series with RSS-feeds in uTorrent.
They are saved into:
K:\TV-Series\Supernatural\Season 06\Supernatural.S06E04.HDTV.XviD-REL\*.rar
But afterwards I have to extract the contents of the rar, and move it one folder up, like this:
K:\TV-Series\Supernatural\Season 06\supernatural.s06e04.hdtv.xvid-rel.avi
This script does that job automatically, among with some other things.
The script will also work for movies, with multiple subdirectories.
Lets say you have it like this:
K:\Movies\Awesome.Movie.DVDRip.XviD-REL\CD 1\*.rar
K:\Movies\Awesome.Movie.DVDRip.XviD-REL\CD 2\*.rar
This script will then extract from both those folders into its parent folder. Like this:
K:\Movies\Awesome.Movie.DVDRip.XviD-REL\awesome.movie.cd1.dvdrip.xvid-rel.avi
K:\Movies\Awesome.Movie.DVDRip.XviD-REL\awesome.movie.cd2.dvdrip.xvid-rel.avi
It also works for single file movies.
From:
K:\Movies\Awesome.Movie.DVDRip.XviD-REL\*.rar
Into:
K:\Movies\Awesome.Movie.DVDRip.XviD-REL\awesome.movie.dvdrip.xvid-rel.avi
The script will try to delete these files and folders:
"<download_path>\CD{1-4}\"
"<download_path>\CD {1-4}\"
"<download_path>\Sample\"
"<download_path>\*.rar"
"<download_path>\*.sfv"
"<download_path>\*.r0{1-9}"
"<download_path>\*.r{10-99}"
Tested with uTorrent v2.2 Build 23703, Windows Server 2008 R2 x64.
!!! uTorrent v3.x has been reported to not work !!!
System Requirements
* uTorrent Version 2.2 (build 21882+)
* timeout (Windows Vista/7)
* WinRAR (with Command-Line unrar.exe)
* XBMC v10 (Dharma)
* EMM/EMM-r
Timeout
A new command in Vista/7 is "timeout". It will cause the command processor to wait for a specified number of seconds or until a key is pressed.
Website
Always check the website, I will not keep this post updated if it doesn't involve a major change
http://bit.ly/g26fH6#autoextract
Edit config.cmd to suit your needs.
Call the script from within uTorrents GLOBAL settings.
Options, Preferences, Advanced, Run Program, Run this program when a torrent finishes:
Code:
"C:\AutoExtract.bat" "%N" "%D" "%L"
A movie download, labeled "Movie":
Code:
"C:\AutoExtract.bat" "Awesome.Movie.DVDRip.XviD-REL" "K:\Movies\Awesome.Movie.DVDRip.XviD-REL" "Movie"
A tv-show download, labeled "TV-Show":
Code:
"C:\AutoExtract.bat" "Supernatural.S06E04.HDTV.XviD-REL" "K:\TV-Series\Supernatural\Season 06\Supernatural.S06E04.HDTV.XviD-REL" "TV-Show"
EDIT: You know what they say, a picture says more than a thousand words
Notification from above script when a new movie is added
Notification from above script when a new episode is added