Tekforums

Chat => Guides & Projects => Topic started by: XEntity on May 31, 2014, 10:23:55 AM

Title: Complete Torrent Automation (with Plex)
Post by: XEntity on May 31, 2014, 10:23:55 AM
UPDATE 09/11/14:

So been playing with this a little more and have realised that I have over complicated things..

Now I just have the below script in uTorrent to run on completion, and so far so good, the script copies the files from the uTorrent folder to the destination to doesn't interrupt the torrent seeding.

I've also made it run hidden changing filebot to filebot.launcher.exe in the command, so if you are running the server and MC on the same machine it doesn't popup the command line version

I've also updated the music format, but still advise against using it because it is rubbish to be honest, and handles music file by file rather than looking at the album as a whole, which means a various artists album will copy to a folder per artist.

filebot.launcher.exe -script fn:amc --output "D:/Media1" --log-file amc.log --action copy --conflict override -non-strict --def "ut_dir=%D" "ut_file=%F" "ut_kind=%K" "ut_title=%N" "ut_label=%L" "ut_state=%S" music=N artwork=n plex=localhost deleteAfterExtract=n clean=n excludeList=amc-input.txt "seriesFormat=D:/Media1/TV/{n}/{'S'+s}/{fn}" "animeFormat=D:/Media1/New Films/{n}/{fn}" "movieFormat=D:/Media1/New Films/{n} {y}/{fn}" "musicFormat=D:/Media1/Music/New/{n}/{album+'/'}{pi.pad(2)+'. '}{artist} - {t}"


I'll leave the rest below in case anyone wants to reference it.



AIM:

A script that once uTorrent finishes downloading, it is automatically run to extract and sort the media files in to the correct folders so that you can use specific media folders in plex rather than having to use "Home Movies".

This script is setup to work with Plex and assumes Plex server is running on the local PC, however if you don't have Plex it will still run fine (it's only 1 flag in the filebot script) This can also be changed to notify XBMC, if there is demand for it I'll add variables at the top to control location of server and XMBC/Plex choices? Although not the most difficult thing to work out.

Note: If you setup an RSS feed in uTorrent, you can get it to automatically download TV episodes when they are availble, and they will just appear in your Plex library without you needing to do anything! This is really easy to setup - Google it!

Requirements:

Filebot needs to be installed, this deals with the extract and multimedia sorting, everything else in this script is to make sure uTorrent doesn't have a fit and to then save duplication as a result!

Optional: Plex Media Server - This is designed around Plex, although will still work if you don't have it!

What it does:


The Batch Script (Save as "filebotscript.bat"):

Code: [Select]
echo off
cls

:: 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.
:: Variables should not have a slash on the end - the variables have an explanation below.
:: Variables shoud avoid using spaces - only because I don't use them and haven't added relevant
:: READY - DIR where files are downloaded to
:: FILMS TV MUSIC ANIME - These are the media locations

:: CONFIGURABLE BACK SLASH VARIABLES LISTED BELOW - NO SPACES IN FILENAMES

:: AUTOMATEDATA - A location that can be used for storing file lists to stop duplication
set AUTOMATEDATA=D:\Automatedata

:: COMPLETETORRENT - DIR where files are downloaded to in uTorrent
set COMPLETETORRENT=D:\Downloads\Complete

:: TEMPMEDIA - temporary folder where a copy of your downloads is made so that uTorrent doesn't lock files (will only copy new files)
set TEMPMEDIA=D:\Downloads\Temp

:: 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
set MEDIA=D:\Media1


:: CONFIGURABLE FORWARD SLASH VARIABLES LISTED BELOW

set FILMS=D:/Media1/New Films
set TV=D:/Media1/TV
set MUSIC=D:/Media1/Music/New
set ANIME=D:/Media1/Anime


echo.
echo  Create automated data and temp folders - ignore already exists errors
echo  #################################################################
echo.

mkdir %AUTOMATEDATA%
mkdir %TEMPMEDIA%



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

:RUNNINGCHECK
if exist %AUTOMATEDATA%\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 > %AUTOMATEDATA%\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 "%COMPLETETORRENT%" /b > "%AUTOMATEDATA%\templist.txt"

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

XCOPY "%COMPLETETORRENT%" "%TEMPMEDIA%" /C /S /H /Y /J /Exclude:%AUTOMATEDATA%\done.txt

REM Below line removed as date redundant following addition of exclude list, date string converts to US date format.
REM XCOPY "%COMPLETETORRENT%" "%TEMPMEDIA%" /C /S /H /Y /J /D:%date:~3,2%-%date:~0,2%-%date:~8,2%


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

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

:: If using XBMC, replace plex below with XBMC

"C:\Program Files\FileBot\filebot" -script fn:amc --output "%MEDIA%" --log-file amc.log --action move --conflict override -non-strict "%TEMPMEDIA%" --def music=N artwork=n plex=localhost deleteAfterExtract=y clean=y "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 "%AUTOMATEDATA%\running.txt"

pause



This is the old script for reference:
(click to show/hide)


This is just an admin script that resets validation and running indicators in case something went wrong, you shouldn't need this with the version of the script above, unless you exit the script before it completes.

Code: [Select]
echo off
cls

:: AUTOMATEDATA - A location that can be used for storing file lists to stop duplication

REM This will clear done list and re run normal process

set AUTOMATEDATA=D:\Automatedata

echo none > "%AUTOMATEDATA%\done.txt"

REM Delete running indicator file

del "%AUTOMATEDATA%\running.txt"

filebotscript.bat


uTorrent Settings:

(https://dl.dropboxusercontent.com/u/27382557/torrentsettings.jpg)
Title: Re: Complete Torrent Automation (with Plex)
Post by: apedra on September 20, 2014, 06:34:37 AM
So I've run into a few problems trying to run this script.  First it wasn't exclusing the files that had already been extracted.  So I added --def excludeList=amc.txt to the amc script. Also, it was mostly working well initially, but now it's prompting me with a y/n question, which results in the whole preocess not being automated. Here is the full script I am running now, and a screen grab:(https://imageshack.com/i/exJiog6Gp)
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=y 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(http://)
Title: Re: Complete Torrent Automation (with Plex)
Post by: apedra on September 20, 2014, 06:38:18 AM
(http://image.torrent-invites.com/images/2014/09/20/Untitledvf9Oj.png)
Title: Re: Complete Torrent Automation (with Plex)
Post by: Eggtastico on September 20, 2014, 21:48:23 PM
try xcopy32 rather than xcopy command.
I think Xcopy32 preserves long file names better. Been long long time since I worked with Dos & I guess its true.. dont use it, you forget it!

Its usually the /y command that auto prompts the yes in an xcopy string.

Also looking at your screen shot, you have a lot of errors.
Starting at the top, it looks like you have not SET= GENERAL - so you that is why you getting an error at the top.
SO you prob got other errors to why it is not working.

look at this line :-

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

again, the error is probably based around not  SET=General in the script


Title: Re: Complete Torrent Automation (with Plex)
Post by: XEntity on September 21, 2014, 01:13:35 AM
The copy command itself is fine, I use daily in my script :)

The issue you are having are all of the variables need to be set as per your setup...

If you don't set them then the script doesn't know what it's doing, it wont store a list of existing files and that's why you are seeing the same files being copied...

You should only need to take the full script and change the variables.. the rest will work without amendment!

At the moment it's only running the AMC script all, the rest isn't actually doing anything :)

configure these general and media can be the same dir, but it will copy the "duplicate" lists to the general location

Code: [Select]
REM CONFIGURABLE BACK SLASH VARIABLES LISTED BELOW

set GENERAL=D:\s1
set READY=D:\Downloads\Ready
set COMPLETE=D:\Downloads\Complete
set MEDIA=D:\Media1

REM CONFIGURABLE FORWARD SLASH VARIABLES LISTED BELOW

set FILMS=D:/Media1/New Films
set TV=D:/Media1/TV
set MUSIC=D:/Media1/Music/New
set ANIME=D:/Media1/Anime
Title: Re: Complete Torrent Automation (with Plex)
Post by: apedra on September 21, 2014, 10:41:39 AM
Thanks for the advice.  I had already set the parameters, but i did'nt post that part.  I did notice that I had set one to the wrong drive!  I just deleted the script and started anew and everything seems to be working better.  One problem, files that arent a part of an archive get moved to my media folder, and utorrent then cant seed the file.  I use private trackers so I need to seed to keep my ratio. How can I work around this? Is their a copy and move option for uncompressed files?
Title: Re: Complete Torrent Automation (with Plex)
Post by: XEntity on September 21, 2014, 21:30:20 PM
The "ready" location should be your finished torrent folder

The "Complete" location should be an empty folder where a temporary copy is created..

Both these locations should not be used in any other references...

The script is designed in such a way not to touch the seeding files, which is why is copies to a temp folder...
Title: Re: Complete Torrent Automation (with Plex)
Post by: apedra on September 22, 2014, 15:07:13 PM
I wonder if my uorrent seetings are affecting this all.  I was having utorrent also move files into my completed folder.  I'm trying now with just leaving the downloads in the same folder,  which will be my ready folder.
Title: Re: Complete Torrent Automation (with Plex)
Post by: XEntity on September 23, 2014, 00:28:52 AM
No moving the files should be fine that's how mine is setup, can you post a screen shot of your utorrent folder settings? And also the variables setup in the script? If I get some time I'll get the script to auto create the temp folders as well and put in some error reporting, although you appear to be the only person using it :-) how did you find it?
Title: Re: Complete Torrent Automation (with Plex)
Post by: 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.
Title: Re: Complete Torrent Automation (with Plex)
Post by: knighty on September 23, 2014, 15:08:26 PM
I'm planning to use it too.... just not yet :-)
Title: Re: Complete Torrent Automation (with Plex)
Post by: apedra on September 23, 2014, 15:13:31 PM
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.
(http://image.torrent-invites.com/images/2014/09/23/UtsettingsacAb.png)
(http://image.torrent-invites.com/images/2014/09/23/Utsettings2bsQge.png)

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: [Select]
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
Title: Re: Complete Torrent Automation (with Plex)
Post by: apedra on September 23, 2014, 16:29:51 PM
(http://image.torrent-invites.com/images/2014/09/23/LogWgqDf.png)
I also noticed that I get an error when the script runs related to my parameters.
Title: Re: Complete Torrent Automation (with Plex)
Post by: XEntity on September 23, 2014, 20:51:13 PM
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!)
Title: Re: Complete Torrent Automation (with Plex)
Post by: XEntity on September 23, 2014, 20:59:02 PM
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.

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..
Title: Re: Complete Torrent Automation (with Plex)
Post by: Eggtastico on September 23, 2014, 21:23:00 PM
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.

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..

or just map a drive letter
Title: Re: Complete Torrent Automation (with Plex)
Post by: XEntity on September 23, 2014, 21:41:08 PM
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.

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..

or just map a drive letter

Not sure what that would achieve? The idea of the script it to copy TV to one location and Films to a different location (renaming folders etc) not just taking the downloads and copying to a different folder..
Title: Re: Complete Torrent Automation (with Plex)
Post by: XEntity on September 23, 2014, 21:49:38 PM
I've updated the script, renaming the variables to make more sense..

It also creates the temporary and automation data folder automatically
Title: Re: Complete Torrent Automation (with Plex)
Post by: Clock'd 0Ne on September 23, 2014, 22:26:49 PM
It's more about extracting into the relevant folder on the relevant drive, e.g. where I have disks 1-4 in my microserver each has a TV folder, with various series in. I'm not sure if it can map like that?
Title: Re: Complete Torrent Automation (with Plex)
Post by: XEntity on September 23, 2014, 22:53:11 PM
Not with this script, however if they are split alphabetically you could run this script then post process based on the first letter?...

A-F on one drive etc..

Otherwise other option is just to span your drives to give one path?

Title: Re: Complete Torrent Automation (with Plex)
Post by: apedra on September 24, 2014, 15:37:44 PM
What a great help you've been XEntity.  Everything is running smoothly now.  With my rss feed and this script, all i have to do is launch the plex app on my tv.  Makes life simple!
Title: Re: Complete Torrent Automation (with Plex)
Post by: XEntity on September 24, 2014, 18:47:59 PM
No problem, glad to be of help!


Sent from my iPad using Tapatalk
Title: Re: Complete Torrent Automation (with Plex)
Post by: XEntity on September 24, 2014, 18:52:02 PM

It's more about extracting into the relevant folder on the relevant drive, e.g. where I have disks 1-4 in my microserver each has a TV folder, with various series in. I'm not sure if it can map like that?

Just had another thought about this, how do you decide what goes on which drive? If you use uTorrent for downloads then it's possible to tag them in uTorrent, and use the tag to define where they go I believe..


Sent from my iPad using Tapatalk
Title: Re: Complete Torrent Automation (with Plex)
Post by: XEntity on November 09, 2014, 22:56:43 PM
Updated original post to just use a single line that can be put direct in uTorrent - I think this should be fine, I can't remember the issue I was having first time around!

But this is much simpler, you need to swap out my folder names with your own obviously!
Title: Re: Complete Torrent Automation (with Plex)
Post by: apedra on November 10, 2014, 14:06:39 PM
The reason I started using the original, more complicated script is because launching it directly from utorrent didnt seem to do anything.  I tried this method and it doesnt seem to be working for me.  I think I'll just go back to before.  I have noticed that upon completing its work (filebot that is), the filebot forum page automatically opens up.  This is very annoying!  Any fix?
Title: Re: Complete Torrent Automation (with Plex)
Post by: XEntity on November 10, 2014, 18:28:24 PM
So I found that uTorrent is quite picky about what's in the box...

If I have "filebot" this works, if I have the full path, then nothing appears to happen..

If I have filebot.launcher it doesn't work, but if I have filebot.launcher.exe it works fine..

I'd suggest playing a little, first of all start with just filebot, at least you can see if it's doing anything?

I've never seen the forum popup ever using either method... so a couple of things...

Check to see what the log file says?
C:\Users\[Username]\AppData\Roaming\FileBot\logs

Secondly a new version of filebot has just been released, so it may be something to do with that? Try upgrading filebot?

Let me know how you get on, the advantage of not using my script will mean it can achieve the same thing but less read/writes..
Title: Re: Complete Torrent Automation (with Plex)
Post by: apedra on November 11, 2014, 03:15:56 AM
I updated filebot to the latest version, and all seems well, except utorrent is showing that files are missing from recently completed torrents.  I manually rechecked the files, so it seems ok now.
Title: Re: Complete Torrent Automation (with Plex)
Post by: XEntity on November 11, 2014, 18:57:44 PM
Good to know! Not sure why they needed a re-check as is set to copy, unless you changed clean up to yes maybe?
Title: Re: Complete Torrent Automation (with Plex)
Post by: billymalcolm on November 11, 2014, 21:15:41 PM
Greatest idea ever!
Can you help withthe script errors I'm getting? Here is the script result:


 Create automated data and temp folders - ignore already exists errors
 #################################################################

A subdirectory or file C:\Automatedata already exists.
A subdirectory or file C:\Downloads\InProgress already exists.

 Check if script is already running
 #################################################################


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

File Not Found

 Copy files to safe "TempTorrent" location excluding those present last time thi
s was run
 #################################################################

File not found - Complete
0 File(s) copied

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


 Run Filebot - unrecognised files will remain in the "TempTorrent" location
 #################################################################

Locking C:\Users\Billy\AppData\Roaming\FileBot\logs\amc.log
Nov 11, 2014 4:11:29 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0
x80000002. Windows RegCreateKeyEx(...) returned error code 5.
Parameter: music = N
Parameter: artwork = n
Parameter: plex = localhost
Parameter: deleteAfterExtract = y
Parameter: clean = y
Parameter: seriesFormat = E:\TV Shows/{n}/{'S'+s}/{fn}
Parameter: animeFormat = /{n}/{fn}
Parameter: movieFormat = C:\Users\Billy\Videos\Movies/{n} {y}/{fn}
Parameter: musicFormat = /{n}/{fn}
Argument: C:\Downloads\InProgress
No files selected for processing
Failure (┬░_┬░)
Launch4j: Failed to run the given command.
Press any key to continue . . .
Title: Re: Complete Torrent Automation (with Plex)
Post by: XEntity on November 12, 2014, 22:16:35 PM
Would be handy if you could paste in the script itself, or at least the variables being used, but I expect I know what the error is or at least one of them...

There are two sets of variable paths, some require backslash (\) the others require forward slash(/)..

The library file paths at least are the wrong way round:

"E:\TV Shows" should be "E:/TV Shows"

However as stated in my recent update, the full script isn't really required, you just need to paste the one line in the first post in to uTorrent (amending your own paths) which will then be much less disk activity.

I've amended below with your details, you should just be able to paste this in to utorrent in the "run this program on completion" field and it should all work :)

I've changed it to show it's running, so you can change filebot to filebot.launcher.exe if you want it to run hidden.

filebot -script fn:amc --output "C:/Users/Billy/Videos" --log-file amc.log --action copy --conflict override -non-strict --def "ut_dir=%D" "ut_file=%F" "ut_kind=%K" "ut_title=%N" "ut_label=%L" "ut_state=%S" music=N artwork=n plex=localhost deleteAfterExtract=n clean=n excludeList=amc-input.txt "seriesFormat=E:/TV Shows/{n}/{'S'+s}/{fn}" "animeFormat=C:/Users/Billy/Videos/Movies/{n}/{fn}" "movieFormat=C:/Users/Billy/Videos/Movies/{n} {y}/{fn}"
Title: Re: Complete Torrent Automation (with Plex)
Post by: soopahfly on December 19, 2014, 19:13:27 PM
This is good :

http://www.htpcguides.com/configure-sickrage-usenet-torrent-tv/


Sickrage is much better than Sickbeard at episode management and redownloading failed episodes.
Title: Re: Complete Torrent Automation (with Plex)
Post by: headlared on July 20, 2015, 18:34:13 PM
Old thread i know but.....

i have had some great success with the script you posted, thanks for the explanation on it, really helpful. My outstanding queries are twofold, first, is there a way for the script to autoextract compressed files?

Second, my media server is my NAS and so i need to move the processed files onto it which currently errors requesting the username and password, im not sure how to add this into the script.

Off the off chance you see this, thanks again for the help so far, if you have any guidance on the above that would be awesome as well.

Title: Re: Complete Torrent Automation (with Plex)
Post by: soopahfly on July 20, 2015, 22:55:28 PM
I'm not sure which bit's you're struggling with.  Sab should automatically extract rar files if the default options are already set to +unrar.

If you add usernames and passwords to the script, you'd be parsing them in plain text.  Much better to either map a drive share or make the folders open for guest access.

Edit.  I just realised this isn't about newsgroups.  You should consider it though, it's far superior to torrenting.
Title: Re: Complete Torrent Automation (with Plex)
Post by: XEntity on July 21, 2015, 00:50:14 AM
Old thread i know but.....

i have had some great success with the script you posted, thanks for the explanation on it, really helpful. My outstanding queries are twofold, first, is there a way for the script to autoextract compressed files?

Second, my media server is my NAS and so i need to move the processed files onto it which currently errors requesting the username and password, im not sure how to add this into the script.

Off the off chance you see this, thanks again for the help so far, if you have any guidance on the above that would be awesome as well.

Sorry only just seen this, but the compressed files should already auto extract.. it may be that you need winrar installed perhaps, but the filebot site is down for maintenance at the moment?

For the username/password can you not setup your system user name and password on the NAS thus authenticating them automatically? Otherwise may be worth posting on the filebot forum, but you don't really wan tot be using plain text passwords as said by soopah :)
Title: Re: Complete Torrent Automation (with Plex)
Post by: headlared on July 21, 2015, 13:12:09 PM
I have winrar installed, tried re-installing for good measure, nothing, just excludes them and doesnt unpack. Any ideas?

On the plus side, i did just match my log on to my windows log on, not sure why i didnt think of that earlier, cheers guys.
Title: Re: Complete Torrent Automation (with Plex)
Post by: headlared on July 21, 2015, 14:39:31 PM
(http://i284.photobucket.com/albums/ll12/headlared/script2_zpsyqyvutff.jpg) (http://[URL=http://s284.photobucket.com/user/headlared/media/script2_zpsyqyvutff.jpg.html)

(http://i284.photobucket.com/albums/ll12/headlared/script1_zpsrifro7yq.jpg) (http://[URL=http://s284.photobucket.com/user/headlared/media/script1_zpsrifro7yq.jpg.html)

(http://i284.photobucket.com/albums/ll12/headlared/Untitled-1_zpswlq9mcpn.jpg) (http://[URL=http://s284.photobucket.com/user/headlared/media/Untitled-1_zpswlq9mcpn.jpg.html)

(http://i284.photobucket.com/albums/ll12/headlared/ut%20setting1_zps3pzuzb3u.jpg)] (http://[URL=http://s284.photobucket.com/user/headlared/media/ut%20setting1_zps3pzuzb3u.jpg.html)

I also removed filenames from done.txt before re-running the script so that it didnt overlook them, but still nothing.

(http://i284.photobucket.com/albums/ll12/headlared/failed%20script%20run_zpsqmlys02j.jpg) (http://[URL=http://s284.photobucket.com/user/headlared/media/failed%20script%20run_zpsqmlys02j.jpg.html)
Title: Re: Complete Torrent Automation (with Plex)
Post by: bear on July 21, 2015, 19:28:14 PM
Can you use different payer that do not need unpacking ? like VLC ?
Title: Re: Complete Torrent Automation (with Plex)
Post by: headlared on July 21, 2015, 19:50:42 PM
thats what i used to do but the aim is to have an automated plex set up so i need to unpack them. just cant figure it out
Title: Re: Complete Torrent Automation (with Plex)
Post by: XEntity on July 21, 2015, 21:23:04 PM
So... first question.. why are you using the old batch script?

Check the very first post it's now been updated, so runs entirely via filebot and utorrent (no batch file)..

The below can just be pasted in the utorrent launcher.. obviously updating your own folder names... (although this shouldn't impact unzipping, it's more elegant and less likely to fail..)

Regarding the unzipping issue.. in the screenshot of it running it shows the location of the amc.log file, can you please grab the data from that (where it is processing the rar file?)

Also can you check that the rar file appears in E:/temp? As only appears to have copied two files in your screen shots? neither of which are your rar files?

I'll be online for a bit now (unlike the filebot site) if you post up will try to respond quickly :)



filebot.launcher.exe -script fn:amc --output "D:/Media1" --log-file amc.log --action copy --conflict override -non-strict --def "ut_dir=%D" "ut_file=%F" "ut_kind=%K" "ut_title=%N" "ut_label=%L" "ut_state=%S" music=N artwork=n plex=localhost deleteAfterExtract=n clean=n excludeList=amc-input.txt "seriesFormat=D:/Media1/TV/{n}/{'S'+s}/{fn}" "animeFormat=D:/Media1/New Films/{n}/{fn}" "movieFormat=D:/Media1/New Films/{n} {y}/{fn}" "musicFormat=D:/Media1/Music/New/{n}/{album+'/'}{pi.pad(2)+'. '}{artist} - {t}"


Title: Re: Complete Torrent Automation (with Plex)
Post by: headlared on July 21, 2015, 22:25:11 PM
(http://i284.photobucket.com/albums/ll12/headlared/logview2_zpsxeeqwjrt.jpg)][URL=http://s284.photobucket.com/user/headlared/media/logview2_zpsxeeqwjrt.jpg.html](http://i284.photobucket.com/albums/ll12/headlared/logview2_zpsxeeqwjrt.jpg) (http://[URL=http://s284.photobucket.com/user/headlared/media/logview2_zpsxeeqwjrt.jpg.html)[/url]

(http://i284.photobucket.com/albums/ll12/headlared/logview_zpsbmeddfpo.jpg)][URL=http://s284.photobucket.com/user/headlared/media/logview_zpsbmeddfpo.jpg.html](http://i284.photobucket.com/albums/ll12/headlared/logview_zpsbmeddfpo.jpg) (http://[URL=http://s284.photobucket.com/user/headlared/media/logview_zpsbmeddfpo.jpg.html)[/url]

(http://i284.photobucket.com/albums/ll12/headlared/scriptfail1_zpsepf64irt.jpg)][URL=http://s284.photobucket.com/user/headlared/media/scriptfail1_zpsepf64irt.jpg.html](http://i284.photobucket.com/albums/ll12/headlared/scriptfail1_zpsepf64irt.jpg) (http://[URL=http://s284.photobucket.com/user/headlared/media/scriptfail1_zpsepf64irt.jpg.html)[/url]

(http://i284.photobucket.com/albums/ll12/headlared/scriptfail2_zpsijgbhpj0.jpg)][URL=http://s284.photobucket.com/user/headlared/media/scriptfail2_zpsijgbhpj0.jpg.html](http://i284.photobucket.com/albums/ll12/headlared/scriptfail2_zpsijgbhpj0.jpg) (http://[URL=http://s284.photobucket.com/user/headlared/media/scriptfail2_zpsijgbhpj0.jpg.html)[/url]

Any help would be be very much appreciated at this point, its driving me nuts...
Title: Re: Complete Torrent Automation (with Plex)
Post by: XEntity on July 21, 2015, 22:38:22 PM
You have a "WARNING" on your first screen shot, it's trying to execute a 64 bit DLL on a 32 bit system.. It's using 7 zip to extract according to the error.. although I don't think that's your problem...

I assume you are actually running a 64 bit OS install? If so you need to download the x64 version of Java.. that should fix your issue.. :)

Title: Re: Complete Torrent Automation (with Plex)
Post by: headlared on July 21, 2015, 23:09:32 PM
(http://i284.photobucket.com/albums/ll12/headlared/64bit_zpszc8buxig.jpg) (http://s284.photobucket.com/user/headlared/media/64bit_zpszc8buxig.jpg.html)

Ok, uninstalled all java, put 64bit install on (you can see in the image) but still getting the same warning. Filebot forums still down as well. Any other reason this error would be thrown that you can think of?
Title: Re: Complete Torrent Automation (with Plex)
Post by: headlared on July 21, 2015, 23:19:33 PM
does this link make any sense to you, bit over my head...

http://stackoverflow.com/questions/26895163/failed-to-load-7z-jbinding-no-7-zip-jbinding-in-java-library-path

seems like its my issue but cant figure it
Title: Re: Complete Torrent Automation (with Plex)
Post by: XEntity on July 21, 2015, 23:25:57 PM
Firstly that's a different issue in your error log, exactly the opposite issue in fact :)

before if was 64 on 32, this is 32 on 64!..

I'd suggest uninstalling 7 zip, then uninstalling filebot, then just re-installing filebot.. it may still be referring to the old java runtime..


Google is your friend for filebot, cached version of the page below:

http://webcache.googleusercontent.com/search?q=cache:PnqyJ-ZbOsAJ:www.filebot.net/forums/viewtopic.php%3Ff%3D8%26t%3D2132+&cd=1&hl=en&ct=clnk&gl=uk (http://webcache.googleusercontent.com/search?q=cache:PnqyJ-ZbOsAJ:www.filebot.net/forums/viewtopic.php%3Ff%3D8%26t%3D2132+&cd=1&hl=en&ct=clnk&gl=uk)
Title: Re: Complete Torrent Automation (with Plex)
Post by: XEntity on July 21, 2015, 23:27:12 PM
Also make sure you have 64 bit filebot :)

Also you don't need to install 7-zip, the dll is installed with filebot..