Chat > Guides & Projects

Complete Torrent Automation (with Plex)

<< < (3/9) > >>

knighty:
I'm planning to use it too.... just not yet :-)

apedra:
I was trying to run the Filebot + utorrent AMC, but it did nothing, so a few internet searches and I found your post.  Like I've said, it mostly works great, the only problem I seem to have is that iy moves uncompressed files to my media folder, and utorrent doesn't know where yhe file is.



I have it set up where utorrent autmatically stats the script (which I have named amc.bat) after a download finishes, and have simplified things by choosing only a download folder.

The code I'm running is below.  I changed one thing because it wasn't reliably excluding files that were already processed. In the bottom part (the actual amc script) I added "--def excludeList=amc.txt"

Really glad I found this post as you've been more than helpful XEntity.  I'm not good with this stuff, just trying to learn some things lately!


--- Code: ---echo off
cls

REM Music is disabled but have included a location if you want to enable in the filebot script, however I don't like how it organises music.
REM Variables should not have a slash on the end - the variables have an explanation below.
REM GENERAL - A location that can be used for storing file lists to stop duplication
REM READY - DIR where files are downloaded to
REM COMPLETE - secondary folder where a copy is made so that uTorrent doesn't lock files
REM MEDIA - The main directory of your media - I don't think this really matters as media locations are defined below, and duplicate list is not used in filebot
REM FILMS TV MUSIC ANIME - These are the media locations

REM CONFIGURABLE BACK SLASH VARIABLES LISTED BELOW

set GENERAL=C:\Users\Pedra\Documents
set READY=E:\Completed
set COMPLETE=E:\Torrent Downloads
set MEDIA=F:\Media

REM CONFIGURABLE FORWARD SLASH VARIABLES LISTED BELOW

set FILMS=F:/Media/Movies
set TV=F:/Media/Series
set MUSIC=F:/Media/Music
set ANIME=F:/Media/Anime

echo.
echo  Check if script is already running
echo  #################################################################
echo.

:RUNNINGCHECK
if exist %GENERAL%\running.txt goto PLEASEHOLD
GOTO:NEXTPLEASE

:PLEASEHOLD

REM Hold for 30 seconds then re-check

echo script running... waiting 30 seconds for re-try
ping 1.1.1.1 /n 1 /w 30000 > NUL
GOTO:RUNNINGCHECK

:NEXTPLEASE

REM Create a file to flag script is running and proceed to run the rest of the script.

echo This file just shows script is running, delete file if script is not running > %GENERAL%\running.txt

echo.
echo  Get Dir listing and save to temporary text file so next time the same files are not copied
echo  #################################################################
echo.

dir "%READY%" /b > %GENERAL%\templist.txt

echo.
echo  Copy files to safe "Ready" location excluding those present last time this was run
echo  #################################################################
echo.

XCOPY %READY% %COMPLETE% /C /S /H /Y /J /Exclude:%GENERAL%\done.txt

echo.
echo  Delete old list and replace with temp list.
echo  #################################################################
echo.

del %GENERAL%\done.txt
ren %GENERAL%\templist.txt done.txt
 
echo.
echo  Run Filebot - unrecognised files will remain in the "Ready" location
echo  #################################################################
echo.

"C:\Program Files\FileBot\filebot" -script fn:amc --output "%MEDIA%" --log-file amc.log --action move --conflict override -non-strict "%COMPLETE%" --def excludeList=amc.txt --def music=N artwork=n plex=localhost deleteAfterExtract=n clean=n "seriesFormat=%TV%/{n}/{'S'+s}/{fn}" "animeFormat=%ANIME%/{n}/{fn}" "movieFormat=%FILMS%/{n} {y}/{fn}" "musicFormat=%MUSIC%/{n}/{fn}"

REM Delete running indicator file

del %GENERAL%\running.txt

pause

--- End code ---

apedra:

I also noticed that I get an error when the script runs related to my parameters.

XEntity:
Right, I see your problem, and I see why... I'll re-write the script so the variables are easier to understand...

First of all remove the def you added in, I'm not sure of the entire impact, but it was better without, I think this was if the script was re-run and a film then became available, and also ensures moved files are deleted..

Set uTorrent to move to completed (just tick the box with your current settings)

You may want to move your general folder, as it will create an exclusion file in this location, but that's up to you..

Where your problem is:

Currently:
set READY=E:\Completed
set COMPLETE=E:\Torrent Downloads

Change To:
set READY=E:\Completed
set COMPLETE=E:\TempTorrent

You will need to create a folder called TempTorrent (no spaces - this is why you are getting an error, you can probably use "" but it's easier just to not use spaces!)

XEntity:

--- Quote from: Clock'd 0Ne on September 23, 2014, 08:04:00 AM ---Although I don't use Plex I was considering giving this a go to automate extracting to my media server, but that will probably need more customisation too.

--- End quote ---

Script will work as is if you just want to extract... even leaving in the plex line shouldn't cause an issue... if you use XBMC you can replace "plex=" with "XBMC=" in the script...

Let me know what you are planning on doing? I'll probably be able to tell you what changes you need....

I'll be amending this script to make it easier anyway..

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version