Here is my setup that I have.
If you are using mac os x this will help you.
1. I have TED search for torrent files of tv shows and it dumps them into a folder called Torrent files on my desktop.
2. I have Transmission look at this folder and if it sees torrent files it will automatically add them and start downloading.
3. Once downloading completes I have Transmission move the completed torrent to a staging folder called Completed Torrents which is on a USB Drive (where all my media is contained anyways)
4. When the mac detects that new media has arrived in the "Completed Torrents" folder I have it run this Automation script:
on run {input, parameters}
tell application "Finder"
set this_folder to folder "Completed Torrents" of disk "Movies and Files"
set default_path to folder "TV Series" of folder "Movies" of disk "Movies and Files"
set this_list to entire contents of this_folder
repeat with i in this_list
try
if kind of i is not "folder" then
if (name of i) contains "House" then
my MoveMovies(i, "House", default_path)
end if
if (name of i) contains "Anatomy" then
my MoveMovies(i, "Greys Anatomy", default_path)
end if
if (name of i) contains "Gear" then
my MoveMovies(i, "Top Gear", default_path)
end if
if (name of i) contains "Crowd" then
my MoveMovies(i, "The IT Crowd", default_path)
end if
if (name of i) contains "South" then
my MoveMovies(i, "South Park", default_path)
end if
if (name of i) contains "Stargate" then
my MoveMovies(i, "Stargate Universe", default_path)
end if
if (name of i) contains "Dexter" then
my MoveMovies(i, "Dexter", default_path)
end if
if (name of i) contains "Weeds" then
my MoveMovies(i, "Weeds", default_path)
end if
else
--If item is a folder and it is empty move to trash! Cleanup from last run!
if (count items) of i is 0 then
delete i
end if
--skip as there is stuff in the folder.
end if
on error errText number errNum
if (errNum is equal to 0) then
-- file already moved.
end if
if (errNum is equal to -15267) then
delete i
end if
end try
end repeat
end tell
return input
end run
on MoveMovies(movie_name, show_name, default_path)
tell application "Finder"
set a to movie_name
set b to show_name
set c to default_path
if (exists folder b of c) then
move a to folder b of c
else
make new folder at c with properties {name:b}
move a to folder b of c
end if
end tell
end MoveMovies
As you can see for every show you add to TED you will have to manually add another if statment to the script but it is not hard to do. That way you can name your folder what ever you want and your mac will do all the work for you. This script also checks your "completed torrents" folder for empty folders and cleans them up for you after a move was completed.
I am still working on this script so check back to my original posting from a few days ago for updates to it.
I use Plex so it does the rest from there automatically as so would XBMC I would assume.
Let me know if you need help in setting this up for yourself.
|