How I got around American Dad showing S09 instead of S10
Posted: 12 May 2014, 01:39
As some of you who deal with this show (American Dad!) know the file name typically is a season behind what it should actually be compared to TheTVDB for whatever reason and this can be really annoying especially if you run automated scripts to process your files. Here is how I got around it, hopefully it helps someone else out..
In Utorrent I call a batch file when torrent state changes
Then in the batch file
The first part simply checks if the torrent state is finished and if so the processing begins, otherwise the batch file exits
Basically it looks at the name of the files and if it determines that it is American Dad! it adds 1 to the season number and puts it into another folder within my completed torrents folder naming it American Dad! - S##E##, if it detects it is not American Dad it copies the video files into this other folder either by folder name or if it is a loose file it just copies it w/o renaming it. Then the 2nd call renames everything properly and sorts it onto my network drives as needed.
The specific format for the first call is
Then the 2nd call can be whatever you want it to be for your needs.
Hopefully this is helpful, its an extra step but it also saves me having to manually rename American Dad so now my media center is 100% automatic.
In Utorrent I call a batch file when torrent state changes
Code: Select all
"C:\downloads\utorrent.bat" "%S" "%N"
Code: Select all
if %1 == "11" goto process
exit
:process
filebot -script fn:amc --output "c:\downloads\Complete torrents\downloads" --log-file amc.log --def "seriesFormat={(n == 'American Dad!' ? (n)+' - S'+(s+1)+'E'+(e.pad(2)) : (folder.name == 'Complete torrents' ? fn : (folder.name == 'downloads' ? fn : folder.name)))}" "movieFormat={folder.name == 'Complete torrents' ? fn : folder.name}" --action move -non-strict "C:\downloads\Complete torrents" --conflict override --def clean=y --def excludelist=amc.txt
filebot -script fn:amc --log-file amc.log --def unsorted=y --def "seriesFormat={new File('H:/videos/Kids TV Shows/', n.replace(':',' -').replace('?','')).exists() ? 'H:/videos/Kids TV Shows/'+n.replace(':',' -').replace('?','') : 'G:/videos/TV Shows/'+n.replace(':',' -').replace('?','')}/{episode.special ? 'Special' : 'Season '+s}{new File('H:/videos/Kids TV Shows/', n.replace(':',' -').replace('?','')).exists() ? '' : (' (')+vf.match(/720[pP]|1080[pP]/)+(')')}/{n.replaceTrailingBrackets().replace(':',' -').replace('?','')} - S{episode.special ? '00' : s.pad(2)}E{es*.pad(2).join('-E').replaceAll('null',{episode.special ? special.pad(2):''})} - {t.replace(':',' -').replace('?','').replacePart (' (Part $1)')}{new File('H:/videos/Kids TV Shows/', n.replace(':',' -').replace('?','')).exists() ? '' : (' (')+vf.match(/720[pP]|1080[pP]/)+(')')}" "movieFormat=H:\videos\Movies\{n.replace(':',' -').replace('?','')} ({y}){\" CD$pi\"}{(' (')+vf.match(/720[pP]|1080[pP]/)+(')')}" --action copy -non-strict "C:\downloads\Complete torrents\downloads" --conflict skip --def storeReport=y --def excludelist=amc.txt
exit
Basically it looks at the name of the files and if it determines that it is American Dad! it adds 1 to the season number and puts it into another folder within my completed torrents folder naming it American Dad! - S##E##, if it detects it is not American Dad it copies the video files into this other folder either by folder name or if it is a loose file it just copies it w/o renaming it. Then the 2nd call renames everything properly and sorts it onto my network drives as needed.
The specific format for the first call is
Code: Select all
"seriesFormat={(n == 'American Dad!' ? (n)+' - S'+(s+1)+'E'+(e.pad(2)) : (folder.name == 'Complete torrents' ? fn : (folder.name == 'downloads' ? fn : folder.name)))}"
Hopefully this is helpful, its an extra step but it also saves me having to manually rename American Dad so now my media center is 100% automatic.