Page 1 of 2

[GUIDE] Fully Automated Media Center with Transmission (Mac)

Posted: 11 Feb 2013, 18:16
by buck3y3
:: THIS GUIDE IS OUTDATED ::


Here's how to set up the Fully Automated Media Center script with Transmission.

1. Create transmission-postprocess shell script

Open Terminal:

Type cd desktop (this will create the file on your desktop, if you want to leave it in your home file skip this step)
Type nano transmission-postprocess
Image

This will bring up nano, a text editor, then copy & paste:

Code: Select all

#!/bin/bash
filebot -script fn:amc --output "path/to/folder" --log-file amc.log --action copy --conflict override -non-strict --def artwork=y "ut_dir=$TR_TORRENT_DIR/$TR_TORRENT_NAME" "ut_kind=multi" "ut_title=$TR_TORRENT_NAME"
Image

Set where processed files should be organized to:
Fully Automated Media Center wrote:2. Change --output to where you want to copy/organize your files. Input is provided by µTorrent variables.
Control + X
Enter Yes to save file
Hit enter to save file as named

This will create a file on your desktop that looks like this:
Image

In terminal type chmod +rx transmission-postprocess and hit enter, it will look like nothing happened
Image

but it will change the file on your desktop to:
Image


2. Setup Transmission to call our shell script on download complete

Now open transmission preferences and set it to call your newly created script at download complete
Image

3. Done

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 02 Apr 2013, 12:30
by te5s3rakt
Hi there,

I've been trying get get this automatic script working on my media center setup without much luck... I've tried, sort of reverse engineering it to match my setup, and without much luck ...

Basically this is my setup and the process i want it to follow...

on a mac mini 2011 model with external Pegasus Raid storage (for media storage)

Current flow:
I add torrents to Transmission
Transmission places unfinished download in an "Active Downloads" folder on the Pegasus
When completed it moves them to the path "/Volumes/PROMISE PEGASUS/Completed Downloads"
There are two folders i then manually sort the downloads into depending on what they are
/Volumes/PROMISE PEGASUS/Movies
/Volumes/PROMISE PEGASUS/Series

I'm looking to automate this process, and so far after much googling not much like... FileBot with this script from what i can tell will do it... but i'm, due to lack of scripting experience, unable to get it working... I was wondering if there was some kind soul out there that can put me out of my misery lol...

basically i want to add torrents to Transmission, then it to put them in Active Downloads, then when finished move them to Completed Download and run a script.
The script will then run FileBot and organise the TV shows into the Series folder in the format
/Volumes/PROMISE PEGASUS/Series/"ShowName" (YearStart)/Season "0"/"Showname" S00E00 - "EpisodeTitle".ext
and movies into the Movies folder in the format of
/Volumes/PROMISE PEGASUS/Movies/"MovieName" ("YearRelease")/"MovieName" ("YearRelease").ext
then after that's complete it'll tell Plex, hey new stuff to add...

Help me ObiWan Kenobi you're my only hope :(

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 02 Apr 2013, 12:45
by rednoah
Did you try setting it up exactly has this tutorial shows? It takes 5 minutes and works as it is. Your paths will be a bit different that's all.

Once that's working you can worry about whatever doesn't work with your specific setup.

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 03 Apr 2013, 13:08
by te5s3rakt
yep... got that working now... its just modifying it to fit my setup is making my head hurt lol... doesn't help either i've only just ported to mac from windows, so finding my way around is alittle hard :P...

I feel lazy for asking, but i was wondering if someone could mod the script for me... me trying seems to just make things not work again... scripting in this manner and on mac is really alien to me :S

the original process is half there
1 Unrar archives
2 Group movies and episodes and then handle them seperately (auto-detect episode-vs-movie file)
3 Fetch subtitles and transcode to SubRip/UTF-8 (i take it that if it detects them already downloaded it will use them)
4 Copy and Organize episodes, movies and music files into folders and rename files properly
Movies will be sorted into {output}/Movies/Name (Year)/Name (Year) 720p [CD123].ext
TV Shows will be sorted into {output}/Series/Name (Year First Aired)/Season Number/Name - S00E00 - Title 720p.ext
No need for music with my setup
no need to Fetch artwork or generate .nfo files as i'm happy with just plex doing that its end for wife proofing
Notify Plex (via HTTP on port 32400) to rescan it's video library
no need to Log into MyEpisodes
no need for Send a report about newly added files per email

i'd be beyond grateful for the help :) seriously would owe you one...

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 03 Apr 2013, 16:05
by rednoah
That's a perfectly normal use-case. You'll not need to touch the script. Just set some cmdline options.

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 04 Apr 2013, 12:57
by te5s3rakt
Lol don't I feel silly... Thought I had to rewrite it in the script... Got it working...
There's a not stupid question though... I want to take advantage of utorrents (on mac) ability to set a monthly total download limit... Would I follow the same steps above for transmission but just go into utorrent and tell it to start the script just made...

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 04 Apr 2013, 14:03
by rednoah
Yep, there's a setup instructions for transmission. Works pretty much the same. Just that you need a shell script in between that calls filebot and passes on the transmission parameters. Check the amc thread.

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 04 Apr 2013, 14:17
by te5s3rakt
Sorry I meant I want to set this up for utorrent on the mac

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 04 Apr 2013, 16:44
by rednoah
As far as I know utorrent for mac doesn't support the "run program on download complete" feature. Maybe check in their forums.

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 05 Apr 2013, 08:23
by te5s3rakt
yeah had a look there... doesn't seem too... whats so special about windows that they get the features first :(...
hey to your knowledge is there a way to maybe get Transmission to stop at a specified monthly limit... i did some googling without much luck and figure you might have heard of something...

hey thanks for the help too... i got that script working perfectly with transmission now... after i realised how to do it right lol

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 05 Apr 2013, 12:56
by te5s3rakt
I'm having trouble with the email function... It's freezing the script at my password as there's a ! in it... The line says -bash !************ event not found...

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 06 Apr 2013, 13:10
by te5s3rakt
i'm also having issues with my subtitles labels... basically want the subtitles language on the sub files so plex can determine the language instead of saying unknown... heres my code I've been passing in terminal manually to test the functions...

Code: Select all

#!/bin/bash
/Applications/Filebot.app/Contents/MacOS/filebot -script fn:amc "/Volumes/PROMISE PEGASUS/Completed Downloads" --output "/Volumes/PROMISE PEGASUS" --action copy --conflict override -non-strict --def artwork=n subtitles=en,de,fr "seriesFormat=Series/{n} [{y}]/Season {s}/{n} - {s00e00} - {t} [{vf}]{\".$lang\"}" "animeFormat=Anime/{n} [{y}]/{n} [{y}] [{vf}]{\".$lang\"}" "movieFormat=Movies/{n} [{y}]/{n} [{y}] [{vf}]{\".$lang\"}" "musicFormat=Music/{n}/{fn}" plex=te5s3rakt clean=y
i notice it leaves all the original files and folders in the completed downloads folder... how can i get it to clean out the folder from everything it sorted into the movies and series folders... --action move maybe?

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 06 Apr 2013, 14:57
by rednoah
--action copy obviously copies files. You can always test things with --action test and the finally move things with --action move.

I don't know what your issues are with language tags, but since you're already adding {lang} I guess you'll be fine.

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 07 Apr 2013, 03:32
by te5s3rakt
Still having an issue with the email log support...

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 07 Apr 2013, 04:34
by rednoah
Change your password. Or read the docs on bash on how to escape !

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 07 Apr 2013, 04:36
by te5s3rakt
Using just {lang} it displays on the end of my subtitle only files... But how would I format it to create subtitle files in the format (example) "Iron Man [2008].eng.srt" currently it displays only "Iron Man [2008]eng.srt"

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 07 Apr 2013, 04:44
by rednoah
Everything you're asking has been answered multiple times before and you can easily find the solution by looking and understanding the examples:
http://www.filebot.net/forums/viewtopic.php?f=5&t=2

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 07 Apr 2013, 05:14
by te5s3rakt
got it now... the expression {".$lang"} on the forum I've been trying overrides the moving of the files to the new directory... using / in it like this {\".\$lang\"} fixed the issue and allowed the script to run as designed...

with plex=hostname... how would you define the hostname... using just the friendly name from the plex media server settings, being te5s3rakt in my case returns UnknownHostException: te5s3rakt testing in terminal

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 07 Apr 2013, 05:24
by rednoah
Yeah, just the hostname should work ideally. If you have network issues you can try setting the IP.

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 21 Apr 2013, 10:00
by Lorian
Hello,
First of all, you are a f*** genius, I discovered this program and it's totally amazing!

I've seen this topic and it seems to be what I really need, but I think I need a mix of the two examples explained here:

Code: Select all

[color=#FF0000]#!/bin/bash
/Applications/Filebot.app/Contents/MacOS/filebot -script fn:amc --output "path/to/folder" --log-file amc.log --action copy --conflict override -non-strict --def artwork=y "ut_dir=$TR_TORRENT_DIR/$TR_TORRENT_NAME" "ut_kind=multi" "ut_title=$TR_TORRENT_NAME"[/color]
and

Code: Select all

[color=#0000FF]#!/bin/bash
/Applications/Filebot.app/Contents/MacOS/filebot -script fn:amc "/Volumes/PROMISE PEGASUS/Completed Downloads" --output "/Volumes/PROMISE PEGASUS" --action copy --conflict override -non-strict --def artwork=n subtitles=en,de,fr  "musicFormat=Music/{n}/{fn}" plex=te5s3rakt clean=y[/color]

Because what I want is to copy the movies/Tvshows to my NAS, but downloading them from Transmission (so using transmission variables, not the "Completed downloads, as the second example.
So could I use a mixture of both? SOmething like this?

Code: Select all

[color=#FF0000]#!/bin/bash
/Applications/Filebot.app/Contents/MacOS/filebot -script fn:amc --output "path/to/folder" --log-file amc.log --action copy --conflict override -non-strict --def artwork=y "ut_dir=$TR_TORRENT_DIR/$TR_TORRENT_NAME" "ut_kind=multi" "ut_title=$TR_TORRENT_NAME"[/color] [color=#0000FF]"seriesFormat=Series/{n} [{y}]/Season {s}/{n} - {s00e00} - {t} [{vf}]{\".$lang\"}" "animeFormat=Anime/{n} [{y}]/{n} [{y}] [{vf}]{\".$lang\"}" "movieFormat=Movies/{n} [{y}]/{n} [{y}] [{vf}]{\".$lang\"}"[/color]

And I have another question, how can I set filebot to organize movies in Spanish and Tv shows and anime in english?

Thank you very much!!

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 21 Apr 2013, 13:05
by rednoah
1. I see no issues with that. Input is either passed in via arguments or via ut_dir/ut_file options. Here's all the docs on my amc script: http://www.filebot.net/forums/viewtopic.php?f=4&t=215

2. Can't use different languages for different rename calls by default. You'd have to modify the script for that.

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 23 Apr 2013, 15:01
by Lorian
Thank you,

I finally got it working by doing this:

Code: Select all

/Applications/Filebot.app/Contents/MacOS/filebot -script fn:amc --output "/Users/mama/Torrent/Series" --log-file amc.log --action copy --conflict override -non-strict --def artwork=y "seriesFormat=Series/{n}/Season {s}/{n} ({y}) - {sxe} - {t}" "ut_dir=$TR_TORRENT_DIR/$TR_TORRENT_NAME" "ut_kind=multi" "ut_title=$TR_TORRENT_NAME" 

You told me that to change the default language I would have to modify the script, ¿where is it? Any idea on what do I have to modify?

Thank you.

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 26 Apr 2013, 18:46
by sleepybear
First you would need to download the script:

http://filebot.net/scripts/amc.groovy

Then change your CL option from -script fn:amc to -script /path/to/script/amc.groovy

Now you can modify your custom version of the script to do whatever your please. Keep in mind the script will now NOT automatically update, which it does with the fn:amc option.

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 16 Sep 2013, 09:40
by stooovie
Hi!

How do I modify this script to NOT pass/manage ISO files? It tries to match/rename/move my game downloads into my movie/TV folders every time, which is, of course, unacceptable.

Thanks!

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 16 Sep 2013, 09:54
by rednoah
Add an ignore rule for iso files.

eg:
--def "ignore=iso"

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 27 Nov 2013, 16:48
by u6q41
Hello, hoping someone could help me out slightly

I followed the instructions above and set output to "/volumes/media1"

However when transmission finishes downloading nothing happens.

I have ran the script via terminal to see if that did anything and this message appears
Last login: Wed Nov 27 16:31:35 on ttys001
/Users/user/Desktop/transmission-postprocess ; exit;
Dans-Mac-mini:~ user$ /Users/user/Desktop/transmission-postprocess ; exit;
Locking /Users/user/.filebot/logs/amc.log
Parameter: artwork = y
Parameter: ut_dir = /
Parameter: ut_kind = multi
Parameter: ut_title =
NullPointerException: java.lang.NullPointerException
java.lang.NullPointerException
at net.sourceforge.filebot.media.ReleaseInfo$FolderEntryFilter.accept(ReleaseInfo.java:351)
at net.sourceforge.filebot.media.MediaDetection.isDiskFolder(MediaDetection.java:86)
at net.sourceforge.filebot.media.MediaDetection$isDiskFolder.call(Unknown Source)
at Script2$_run_closure9.doCall(Script2.groovy:18)
at Script2$_run_closure9.doCall(Script2.groovy)
at Script3.resolveInput(Script3.groovy:71)
at Script3$_resolveInput_closure60.doCall(Script3.groovy:72)
at Script3.resolveInput(Script3.groovy:72)
at Script3.run(Script3.groovy:83)
at net.sourceforge.filebot.cli.ScriptShell.evaluate(ScriptShell.java:102)
at net.sourceforge.filebot.cli.ScriptShell.runScript(ScriptShell.java:95)
at net.sourceforge.filebot.cli.ArgumentProcessor.process(ArgumentProcessor.java:125)
at net.sourceforge.filebot.Main.main(Main.java:190)
Failure (°_°)
logout

[Process completed]

Can anyone see where I'm going wrong?

Thanks

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 27 Nov 2013, 17:15
by rednoah
Luckily it crashes!! :D

You're passing in all of / as input ... that's pretty stupid for obvious reasons...

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 27 Nov 2013, 17:20
by u6q41
Ok thanks, so what should I do?

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 27 Nov 2013, 17:29
by rednoah
Not passing in your ENTIRE FILESYSTEM for starters...

This part:

Code: Select all

"ut_dir=$TR_TORRENT_DIR/$TR_TORRENT_NAME" "ut_kind=multi" "ut_title=$TR_TORRENT_NAME"
Should end up like this after variables are resolved:

Code: Select all

"ut_dir=D:\Media\Avatar" "ut_file=" "ut_kind=multi" "ut_title=Avatar"
This is you:

Code: Select all

"ut_dir=/" "ut_file=" "ut_kind=multi" "ut_title="
Why transmission doesn't seem to set these variables you'll have to figure out yourself. Maybe they changed something. Go ask in the transmission forums.

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 11 Dec 2013, 17:43
by Syricon
Hi

Im hoping you can help me and this is simple.
I just can't seem to get this script right. Its stock standard other than my folder output.
For some reason all of my TV Shows are going to the Movies folder after Transmission and "force matching" to some weird movie titles. e.g. Modern Family series to Modern Family (1985) (movie)
So the script is running, its just that its forcing movies on all downloads?

here is the script Im using.

#!/bin/bash
/Applications/Filebot.app/Contents/MacOS/filebot -script fn:amc --output "/Volumes/ENTERTAINMENT" --log-file amc.log --action copy --conflict override -non-strict --def artwork=y "ut_dir=$TR_TORRENT_DIR/$TR_TORRENT_NAME" "ut_kind=multi" "ut_title=$TR_TORRENT_NAME"

and when I run the script this is what I get:

Last login: Tue Dec 10 23:58:52 on ttys000
server:~ Allan$ /Users/Allan/Desktop/transmission-postprocess ; exit;
Locking /Users/Allan/.filebot/logs/amc.log
Parameter: artwork = y
Parameter: ut_dir = /
Parameter: ut_kind = multi
Parameter: ut_title =
NullPointerException: java.lang.NullPointerException
java.lang.NullPointerException
at net.sourceforge.filebot.media.ReleaseInfo$FolderEntryFilter.accept(ReleaseInfo.java:351)
at net.sourceforge.filebot.media.MediaDetection.isDiskFolder(MediaDetection.java:86)
at net.sourceforge.filebot.media.MediaDetection$isDiskFolder.call(Unknown Source)
at Script2$_run_closure9.doCall(Script2.groovy:18)
at Script2$_run_closure9.doCall(Script2.groovy)
at Script3.resolveInput(Script3.groovy:71)
at Script3$_resolveInput_closure60.doCall(Script3.groovy:72)
at Script3.resolveInput(Script3.groovy:72)
at Script3.run(Script3.groovy:83)
at net.sourceforge.filebot.cli.ScriptShell.evaluate(ScriptShell.java:102)
at net.sourceforge.filebot.cli.ScriptShell.runScript(ScriptShell.java:95)
at net.sourceforge.filebot.cli.ArgumentProcessor.process(ArgumentProcessor.java:125)
at net.sourceforge.filebot.Main.main(Main.java:190)
Failure (°_°)
logout

[Process completed]


Thank you in advance

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 11 Dec 2013, 17:59
by rednoah
Exactly the same issue as the above. Somehow the script doesn't get the variables. The issue seems that the environment variables that transmission is supposed to set are not set.

Go to the transmission forums for help with that.

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 22 Feb 2014, 00:00
by rajjejosefsson
Hey, I'm new on filebot and here, i have OS X mavericks just moved from Windwos computer so am new on everything.
and i need some help to rename my movies, and then i saw this Automated stuff.

I want my movies that get finish from transmission to get renamed and moved to a folder

I want the movies to look like this: The Shawshank Redemption (1994), The Shawshank Redemption (1994) and english sub for the movie
I want the series to look like this: Prison Break, Season 1,2,3,4, Prison break S01e01


what does this mean in the guide
Fully Automated Media Center wrote:
2. Change --output to where you want to copy/organize your files. Input is provided by µTorrent variables.

would appreciate any help before I do something wrong. do not want to sabotage anything.

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 24 Feb 2014, 02:02
by nytram
Hi

--output is the directory you want to output to eg

hard disk two would be --output d:\

Movies would then be placed in d:\Movies\The Shawshank Redemption (1994)\The Shawshank Redemption.mp4 etc
TV Shows would be placed in d:\TV Shows\Prison Break\Season 1\Prison Break - S01E01 - Pilot.mp4

a directory would be --output d:\media\
Movies would then be placed in d:\media\Movies\The Shawshank Redemption (1994)\The Shawshank Redemption.mp4 etc
TV Shows would be placed in d:\media\TV Shows\Prison Break\Season 1\Prison Break - S01E01 - Pilot.mp4

Hope that helps

Martyn

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 25 Feb 2014, 00:11
by rajjejosefsson
nytram wrote:Hi

--output is the directory you want to output to eg

hard disk two would be --output d:\

Movies would then be placed in d:\Movies\The Shawshank Redemption (1994)\The Shawshank Redemption.mp4 etc
TV Shows would be placed in d:\TV Shows\Prison Break\Season 1\Prison Break - S01E01 - Pilot.mp4

a directory would be --output d:\media\
Movies would then be placed in d:\media\Movies\The Shawshank Redemption (1994)\The Shawshank Redemption.mp4 etc
TV Shows would be placed in d:\media\TV Shows\Prison Break\Season 1\Prison Break - S01E01 - Pilot.mp4

Hope that helps

Martyn
Why does i get duplicates, the movie or tvshow in two places, one renamed and moves as i want, and one other thats not renamed or moved
and i also want or i really need the poster to change the name same as the movie/tvshow are.

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 25 Feb 2014, 23:12
by nytram
Hi

You don't get duplicates there are TWO (2) Examples one using --output d:\ the other using --output d:\media\

I don't understand what this means?

i also want or i really need the poster to change the name same as the movie/tvshow are.


If it means changing the movies/tvshow to their correct names that is exactly what Filebot does.

I would suggest you chose your output path and try one or two files and see what happens

Martyn

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 26 Feb 2014, 05:40
by rajjejosefsson
nytram wrote:Hi

You don't get duplicates there are TWO (2) Examples one using --output d:\ the other using --output d:\media\

I don't understand what this means?

i also want or i really need the poster to change the name same as the movie/tvshow are.


If it means changing the movies/tvshow to their correct names that is exactly what Filebot does.

I would suggest you chose your output path and try one or two files and see what happens

Martyn
why do i get duplicates?

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 26 Feb 2014, 06:25
by rednoah
You sure you wanna pass in your entire file system????

Code: Select all

Parameter: ut_dir = /
Looks like Transmission is not setting environment variables correctly before the bash script is called which relies on them.

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 26 Feb 2014, 06:33
by rajjejosefsson
rednoah wrote:You sure you wanna pass in your entire file system????

Code: Select all

Parameter: ut_dir = /
Looks like Transmission is not setting environment variables correctly before the bash script is called which relies on them.
How should i then setup the script? I typed in users/myname/documents in the script as i typed above.

And what will happend if its the entire filesystem? Because i got my movie and tvshow folder at my Document folder and movies renamed there.
Ans how do i change poster.jpg to moviename.jpg?

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 26 Feb 2014, 06:48
by rednoah
1. Consult the Transmission docs for how to call 3rd party programs and how to pass in arguments. Maybe they changed that and the script above doesn't work anymore. You do know what $TR_TORRENT_DIR is supposed to mean right? And that if $TR_TORRENT_DIR is empty something is wrong.

2. You can't unless you modify the scripts.

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 26 Feb 2014, 07:07
by rajjejosefsson
rednoah wrote:1. Consult the Transmission docs for how to call 3rd party programs and how to pass in arguments. Maybe they changed that and the script above doesn't work anymore. You do know what $TR_TORRENT_DIR is supposed to mean right? And that if $TR_TORRENT_DIR is empty something is wrong.

2. You can't unless you modify the scripts.

will any bad happen when its wrong? because it works a little bit for now
How do i modify the scripts?

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 28 Feb 2014, 17:21
by rajjejosefsson
Can someone at least tell me if anything bad will happen if the script is wrong as it is for now for me? (Because it works abit with renaming and moving the files and downloads the subs)
and is it bad to try by my own in the terminal when im not know what im doing? change those "/{/--

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 28 Feb 2014, 17:30
by rednoah
Probably, you're telling filebot to rename your entire system, everything. Luckily filebot will ignore most of that since system libraries rarely have extensions like .avi or what not. Probably this includes partial downloads, what it definitely includes is all the files that have already been renamed previously, so it'll hit the dbs over and over and hopefully get you banned rather then waste their resources.

Don't use the script until you figure out how to pass in the folder path of the newly finished download.

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 28 Feb 2014, 22:37
by rajjejosefsson
https://forum.transmissionbt.com/viewto ... 602#p67602
rajjejosefsson wrote:
Looks like Transmission is not setting environment variables correctly before the bash script is called which relies on them. (said by one on the forum on filebot)

Wrong.

A lot of people use scripts with Transmission, and we don't have any problem like that, the variables are set.

rajjejosefsson wrote:
if $TR_TORRENT_DIR is empty something is wrong.

Right.

It probably means that Transmission is not running the script (i.e. check your settings). Your log probably was produced by running the script manually.

A better log can be made by adding this to the top of the script:
CODE: SELECT ALL
#!/bin/bash -x
#
# DEBUG
LOG=/tmp/$$.log
exec > $LOG 2>&1


 

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 01 Mar 2014, 20:26
by rednoah
rb07 wrote:It looks like you're doing everything wrong.
Sorry you're running into issues, but without some basic console skills on your side and some initiative with testing things to find where the issue is neither me nor rb07 can do much about it.

PS: I've read the thread you've linked above, undoubtedly rb07 knows what he's talking about when it comes to transmission and bash

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 02 Mar 2014, 11:05
by rajjejosefsson
rednoah wrote:
rb07 wrote:It looks like you're doing everything wrong.
Sorry you're running into issues, but without some basic console skills on your side and some initiative with testing things to find where the issue is neither me nor rb07 can do much about it.

PS: I've read the thread you've linked above, undoubtedly rb07 knows what he's talking about when it comes to transmission and bash
i am testing! I've tried several times. with no result. and typed in the text with plain text manually have tried using in texedit.app and textmate.app : "ut_dir=$TR_TORRENT_DIR/$TR_TORRENT_NAME" "ut_kind=multi" "ut_title=$TR_TORRENT_NAME"

but it still says its wrong. so where is it im doing wrong.
Because I write in every letter as it is and "$/_ and so on that are here
"ut_dir=$TR_TORRENT_DIR/$TR_TORRENT_NAME" "ut_kind =multi" "ut_title =$TR_TORRENT_NAME"


Is this possible to get for me/others?

Anything used incorrectly may give bad results. That said, you should tell Filebot's developer that he should handle null strings, in this case, rather than suggesting users are purposely inserting "/" in "ut_dir =$TR_TORRENT_DIR/$TR_TORRENT_NAME".

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 02 Mar 2014, 15:17
by rajjejosefsson
did this now... i put this in the script before the script instead of the #!/bin/bash

#!/bin/bash -x
#
# DEBUG
LOG=/tmp/$$.log
exec > $LOG 2>&1



so i have been working since the beginning if I'm right?

Question one
I wonder how i can rename the poster.jpg that the script create, i want it to have same name as the movie.

And the last question.
Why do i get duplicates movies
One of them ends up where i have told it to be downloaded at from transmission (Not renamed) and one ends up where the script moves and rename the files. (everything renamed)

in the script it says copy only can i change that?
and what is xattr that fails?

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 02 Mar 2014, 15:50
by rednoah
See how ut_dir is passed in correctly now? Looks like it's doing what it's supposed to be doing.

1. Rename artwork? Not possible. You can do it yourself or have some script do it afterwards.

2. Look at the logs, it says COPY which means it'll COPY files. There rest is in the docs.

3. Ignore the xattr warnings, it's because you're using the outdated Java 6 runtime

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 02 Mar 2014, 16:12
by rajjejosefsson
Can i ask you how to do a script that renames my pictures as the movie/tvshow name?

yea i saw that, So it should be copied? then i wonder if its possible to get the not renamed file to get deleted after download with the script?

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 02 Mar 2014, 16:17
by rednoah
1. Do some programming courses

2. Set --action move instead of --action copy

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 02 Mar 2014, 16:40
by rajjejosefsson
rednoah wrote:1. Do some programming courses

2. Set --action move instead of --action copy
1. thanks, i got it to work but its a text file that come with the movie can i get it removed and also the folder?

2. So its not easy to get just the poster.jpg in the movies folder to get same name? it sounds easy but.

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 02 Mar 2014, 17:00
by rednoah
1. RTFM
--def clean=y Automatically empty folders and clutter files that may be left behind after moving the video files or temporary extracted files after copying

2. Yes, it's very easy for anyone who knows a bit of programming

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 12 Mar 2014, 13:49
by plittlefield
I cannot seem to get Transmission to run my script.

I have downloaded the original amc.groovy file and tweaked it to work with my directories.

If I run it manually substituting the Transmission variables for full paths and filenames etc. it works.

If I run it manually passing the Transmission variables for full paths and filenames etc. it works.

But Transmission does not run it itself.

My settings and files are as follows:-

Code: Select all

#!/bin/bash
# transmission_filebot.sh
/usr/bin/filebot -script "/home/paully/Bin/amc_paully.groovy" --output "/home/paully/Videos" --log-file "/home/paully/.filebot/logs/amc_paully.log" --action copy --conflict override -non-strict --def "ut_dir=$TR_TORRENT_DIR/$TR_TORRENT_NAME" "ut_kind=multi" "ut_title=$TR_TORRENT_NAME"

Code: Select all

/etc/transmission-daemon/settings.json
"script-torrent-done-enabled": true, 
"script-torrent-done-filename": "/home/paully/Bin/transmission_filebot.sh",
Any ideas?

Thanks

:-)

Paully

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 12 Mar 2014, 15:33
by rednoah
Could you be missing a simple chmod +x? Or some other type of permission issue that would stop transmission from executing the script?

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 12 Mar 2014, 17:48
by plittlefield
All good as far as I can see...

Code: Select all

-rwxrwxr-x 1 paully paully 344 Mar 12 14:10 /home/paully/Bin/transmission_filebot.sh*
...and besides it works when I feed it variables...

Code: Select all

$ TR_TORRENT_DIR="/home/paully/Downloads/transmission/tv" TR_TORRENT_NAME="Marvels.Agents.of.S.H.I.E.L.D.S01E15.720p.HDTV.x264-REMARKABLE" ~/Bin/transmission_filebot.sh
...and the log file shows...

Code: Select all

Parameter: ut_dir = /home/paully/Downloads/transmission/tv/Marvels.Agents.of.S.H.I.E.L.D.S01E15.720p.HDTV.x264-REMARKABLE
Parameter: ut_kind = multi
Parameter: ut_title = Marvels.Agents.of.S.H.I.E.L.D.S01E15.720p.HDTV.x264-REMARKABLE
Read archive [marvels.agents.of.s.h.i.e.l.d.s01e15.720p.hdtv.x264-remarkable.rar] and extract to [/home/paully/Downloads/transmission/tv/Marvels.Agents.of.S.H.I.E.L.D.S01E15.720p.HDTV.x264-REMARKABLE/marvels.agents.of.s.h.i.e.l.d.s01e15.720p.hdtv.x264-remarkable/Marvels.Agents.of.S.H.I.E.L.D.S01E15.720p.HDTV.x264-REMARKABLE]
Extracting files [/home/paully/Downloads/transmission/tv/Marvels.Agents.of.S.H.I.E.L.D.S01E15.720p.HDTV.x264-REMARKABLE/marvels.agents.of.s.h.i.e.l.d.s01e15.720p.hdtv.x264-remarkable/Marvels.Agents.of.S.H.I.E.L.D.S01E15.720p.HDTV.x264-REMARKABLE/Marvels.Agents.of.S.H.I.E.L.D.S01E15.720p.HDTV.x264-REMARKABLE.mkv]
Input: /home/paully/Downloads/transmission/tv/Marvels.Agents.of.S.H.I.E.L.D.S01E15.720p.HDTV.x264-REMARKABLE/marvels.agents.of.s.h.i.e.l.d.s01e15.720p.hdtv.x264-remarkable/Marvels.Agents.of.S.H.I.E.L.D.S01E15.720p.HDTV.x264-REMARKABLE/Marvels.Agents.of.S.H.I.E.L.D.S01E15.720p.HDTV.x264-REMARKABLE.mkv
Group: [tvs:Marvels Agents of S H I E L D] => [Marvels.Agents.of.S.H.I.E.L.D.S01E15.720p.HDTV.x264-REMARKABLE.mkv]
Rename episodes using [TheTVDB]
Auto-detected query: [Marvels Agents of S H I E L D]
Fetching episode data for [Marvel's Agents of S.H.I.E.L.D.]
[COPY] Rename [/home/paully/Downloads/transmission/tv/Marvels.Agents.of.S.H.I.E.L.D.S01E15.720p.HDTV.x264-REMARKABLE/marvels.agents.of.s.h.i.e.l.d.s01e15.720p.hdtv.x264-remarkable/Marvels.Agents.of.S.H.I.E.L.D.S01E15.720p.HDTV.x264-REMARKABLE/Marvels.Agents.of.S.H.I.E.L.D.S01E15.720p.HDTV.x264-REMARKABLE.mkv] to [/home/paully/Videos/TV/Marvel's_Agents_of_S_H_I_E_L_D/Marvel's_Agents_of_S_H_I_E_L_D_S01E15.mkv]
Processed 1 files
Done ヾ(@⌒ー⌒@)ノ
...it just won't do it on its own.

:-(

Paully

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 12 Mar 2014, 18:15
by rednoah
Then I guess the next step is figure out why transmission is not calling the script, or any scripts for that matter. Try posting in their forums as well.

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 13 Mar 2014, 08:24
by plittlefield
I will, good idea... however...

I used to have a simple script to output exactly those same variables to a text log file.

Code: Select all

#!/bin/bash
# torrent_done.sh
{
LOG_FILE=/tmp/torrent_done.log
echo "${TR_TORRENT_ID}/${TR_TORRENT_DIR}/${TR_TORRENT_NAME}" >>$LOG_FILE
} &
That's been working perfectly for the last year!

Could it be to do with Java versions?

The saga continues...

:-\

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 13 Mar 2014, 09:13
by plittlefield
I have put back the original script to test it tonight.

Code: Select all

/etc/transmission-daemon/settings.json
"script-torrent-done-enabled": true, 
"script-torrent-done-filename": "/home/paully/Bin/torrent_done.sh",
PS: I have tried 3 times to register on the Transmission forum, it's not easy!

:-)

Paully

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 13 Mar 2014, 10:28
by rednoah
Well, if the script is called then why don't you add lots of logging and output redirects so you can figure out what it says and where exactly it fails?

If the script is run correctly then it can't not work.

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 13 Mar 2014, 11:54
by plittlefield
I am going to test it tonight using my old simple logging script (which uses exactly the same TR_ variables!), then try the filebot version again tomorrow.

I have posted on the Transmission forum for any thoughts.

I DO love a challenge...

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 14 Mar 2014, 16:24
by plittlefield
Well, needless to say my old script was run by Transmission as expected and gave me my log file...

Code: Select all

/tmp/torrent_done.log
1//home/paully/Downloads/transmission/tv/The.Big.Bang.Theory.S07E18.720p.HDTV.X264-DIMENSION
2//home/paully/Downloads/transmission/tv/The.Crazy.Ones.S01E18.720p.HDTV.x264-KILLERS
...so, it's not Transmission!

Any other ideas?

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 14 Mar 2014, 16:49
by plittlefield
Aaaaah, I think I may have found something in the debug logs...!

Code: Select all

/home/paully/.filebot/logs/amc_paully.log (Permission denied)
Ofcourse, the script is being run by the transmission-daemon user and group...!

So, if I change the group ownership of my ~/.filebot folder to the same group as Transmission, and make it writeable then the error should go and the Filebot script should run...

Code: Select all

chgrp -R debian-transmission ~/.filebot
chmod -R g+w ~/.filebot
...fingers crossed tonight.

:-)

Paully

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 14 Mar 2014, 17:40
by rednoah
Yes, naturally filebot will not full access to it's application data folder, the log is the first thing that fails, but more importantly it'll need it a place to cache some data.

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 14 Mar 2014, 19:01
by plittlefield
OK, fixed it completely and it's so annoyingly simple.

Change the user transmission-daemon runs as, then fix folder ownership.

Code: Select all

$ sudo /etc/init.d/transmission-daemon stop
$ sudo nano /etc/init.d/transmission-daemon
  USER=paully
$ sudo chown paully /etc/transmission-daemon/*
$ sudo chown -R paully /var/lib/transmission-daemon/
$ sudo /etc/init.d/transmission-daemon start
Transmission then downloads all torrents as my username and so Filebot uses those variables and copies files into folders already owned by me.

Growl, sigh, and general comments like "yeah, why isn't that in the documentation?!?... mumble, moan."

:-)

Paully

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 14 Mar 2014, 19:45
by rednoah
You're welcome to write an extra thread on this issue, or an improved / alternate tutorial for setting things up correctly. ;)

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 15 Mar 2014, 13:06
by plittlefield
OK, I'll put it on my list of things to do :-)

I will donate now too.

Thanks.

Paully

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 16 Jun 2014, 18:01
by ErsinB
I'm having some trouble since the update. My AMC doesn't work anymore. I just read every single topic about this, but couldn't fix it. I'll be delighted if someone could help me with this.

I'm just using the simple script:

Code: Select all

#!/bin/bash
/Applications/Filebot.app/Contents/MacOS/filebot -script fn:amc --output "/Users/ErsinB/Downloads" --log-file amc.log --action copy --conflict override -non-strict --def artwork=n subtitles=en,nl --def [email protected] "ut_dir=$TR_TORRENT_DIR/$TR_TORRENT_NAME" "ut_kind=multi" "ut_title=$TR_TORRENT_NAME"
But this didn't execute the automatic renaming proces after a download. If I execute this file terminal gives me this:
Last login: Mon Jun 16 19:04:42 on ttys000
imac-van-ersinb:~ ErsinB$ /Users/ErsinB/Desktop/transmission-postprocess ; exit;
/Users/ErsinB/Desktop/transmission-postprocess: line 2: /Applications/Filebot.app/Contents/MacOS/filebot: No such file or directory
logout

[Proces voltooid]
So I looked in the /Applications/Filebot.app/Contents/MacOS/filebot folder, and only saw filebot.sh. So i changed the script into this:

Code: Select all

#!/bin/bash
/Applications/Filebot.app/Contents/MacOS/filebot.sh -script fn:amc --output "/Users/ErsinB/Downloads" --log-file amc.log --action copy --conflict override -non-strict --def artwork=n subtitles=en,nl --def [email protected] "ut_dir=$TR_TORRENT_DIR/$TR_TORRENT_NAME" "ut_kind=multi" "ut_title=$TR_TORRENT_NAME"
This still didn't rename any downloaded file. When I execute this terminal tells me:
Last login: Mon Jun 16 19:43:13 on ttys000
/Users/ErsinB/Desktop/transmission-postprocess ; exit;
imac-van-ersinb:~ ErsinB$ /Users/ErsinB/Desktop/transmission-postprocess ; exit;
Exception in thread "main" java.lang.UnsupportedClassVersionError: net/filebot/Main : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
logout

[Proces voltooid]
I already installed Oracle Java SE Runtime Environment 8, that didn't solve anything. I tried to delete/reinstall the latest FileBot, but that didn't fix it neither. So I'm out of ideas.

Could someone help me with this? What am I doing wrong?

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 16 Jun 2014, 18:26
by rednoah
You're still running Java 6. Use google to figure out how to make it use Java 8 instead.

Java 6 runtime telling you that it can't run Java 7 code:

Code: Select all

Exception in thread "main" java.lang.UnsupportedClassVersionError: net/filebot/Main : Unsupported major.minor version 51.0

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 16 Jun 2014, 18:46
by ErsinB
Ok, I think I fixed that. Terminal gives me this when I ask for the current version:
Last login: Mon Jun 16 20:41:06 on ttys000
imac-van-ersinb:~ ErsinB$ java -version
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)
imac-van-ersinb:~ ErsinB$
But when I execute the transmission-postprocess, it gives me this now:
Last login: Mon Jun 16 20:44:30 on ttys000
imac-van-ersinb:~ ErsinB$ /Users/ErsinB/Desktop/transmission-postprocess ; exit;
Locking /Users/ErsinB/.filebot/logs/amc.log
Parameter: artwork = n
Parameter: subtitles = en,nl
Parameter: mailto = *****
Parameter: ut_dir = /
Parameter: ut_kind = multi
Parameter: ut_title = null
NullPointerException: java.lang.NullPointerException
java.lang.NullPointerException
at net.filebot.media.ReleaseInfo$FolderEntryFilter.accept(ReleaseInfo.java:421)
at net.filebot.media.MediaDetection.isDiskFolder(MediaDetection.java:92)
at net.filebot.cli.ScriptShellMethods.isDisk(ScriptShellMethods.java:89)
at Script1.resolveInput(Script1.groovy:141)
at Script1$_resolveInput_closure80.doCall(Script1.groovy:142)
at Script1.resolveInput(Script1.groovy:142)
at Script1$_run_closure46.doCall(Script1.groovy:165)
at Script1.run(Script1.groovy:165)
at net.filebot.cli.ScriptShell.evaluate(ScriptShell.java:60)
at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:81)
at net.filebot.cli.ArgumentProcessor.process(ArgumentProcessor.java:108)
at net.filebot.Main.main(Main.java:192)
Failure (°_°)
logout

[Proces voltooid]
So what's wrong now :?

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 16 Jun 2014, 19:06
by rednoah
The environment variables that transmission should be passing in are not passed in.

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 16 Jun 2014, 19:21
by ErsinB
Which means?

I justed tested it with a download, it did proces everything. Renaming, downloading subs and creating a folder. Everything just worked. I don't know why and how, but it did :D.

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 17 Jul 2014, 16:37
by Meph88
Hi guys,

I am having major issues here.
I just got a mac mini and am fairly new to the mac OS environment.
I have the filebot postprocess running on a Windows 8.1 PC perfectly but want to move these processes to the new mac mini.
I've tried a few variations to get this working and I have followed the instructions here exactly but it appears that transmission is not running the script I'm telling it to.

The script I have set up and am attempting to use is as follows:

#!/bin/bash
/Applications/Filebot.app/Contents/MacOS/filebot.sh -script fn:amc --output "/Users/KevsMacMini/Documents/Sorted” --log-file amc.log --action copy --conflict override -non-strict --def music=y subtitles=en artwork=y plex=http://plexserver/web/index.html pushover=xxxxxxxxxx "ut_dir=$TR_TORRENT_DIR/$TR_TORRENT_NAME" "ut_kind=multi" "ut_title=$TR_TORRENT_NAME"

Obviously I changed the plex and pushover specifics but I can not for the life of me get this to do anything. The torrent files download and then........ nothing else happens.

Please help me. I have tried for hours, I believe I am close but just can't get this running.

To add from the above, I have tried running in terminal this:
#!/bin/bash
/Applications/Filebot.app/Contents/MacOS/filebot.sh -script fn:amc "/Users/KevsMacMini/Documents/TestDLlocation" --output "/Users/KevsMacMini/Documents/Sorted" --action move --conflict override -non-strict --def music=y artwork=y --def excludeList=excludelog.txt

This script works fine and I'm able to use it to organise files but the automated postprocess I can not get working.

Any help is appreciated.

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 04 Aug 2014, 19:56
by DrKnate
Try to just install the Java 8 JDK, it will change all the variables needed during the install.

http://www.oracle.com/technetwork/java/ ... 33151.html


After Installing:

Code: Select all

$ java -version
java version "1.8.0_11"
Java(TM) SE Runtime Environment (build 1.8.0_11-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.11-b03, mixed mode)

Seems to work now.

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 11 Oct 2014, 18:30
by iMe
Hi guys,

There is a way to run a program feature in uTorrent for Mac but you'll have to use it via remote.utorrent.com after you set the login settings in uTorrent preferences

Image

So, can anyone make a tutorial about Mac+uTorrent?

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 31 Oct 2014, 12:16
by donok
Hi,

I tried to set up filebot with transmission on Mac OS X 10.10 and can't make it work. I installed filebot with Homebrew cask as detailed here http://www.filebot.net/forums/viewtopic.php?f=4&t=2049

I created a script as suggested

Code: Select all

#!/bin/bash

filebot -script fn:amc --output "/Volumes/Media" --log-file amc.log --action copy -non-strict "ut_dir=$TR_TORRENT_DIR/$TR_TORRENT_NAME" "ut_kind=multi" "ut_title=$TR_TORRENT_NAME"

The script works perfectly when called from Terminal, but doesn't run when called from Transmission.

It tried to add log monitoring to the script to make sure it is called by Transmission, and that works perfectly. The script is called, but the filebot action is not performed and the argument are correctly passed
I also tried with a fixed input folder

Code: Select all

#!/bin/bash

filebot -script fn:amc --output "/Volumes/Media" --log-file amc.log --action copy -non-strict "/Users/Myself/Downloads"  

Again, works fine when called from Terminal, no action when called from Transmission.

Any other idea why filebot is not cooperative when called from Transmission script ??

Thanks

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 31 Oct 2014, 15:11
by rednoah
So it works if you run it yourself but not from transmission? And you made sure the script is called by redirecting output? Try redirecting filebot output (including error output!!!) to a file and see what it says.

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 03 Nov 2014, 15:38
by donok
rednoah wrote:So it works if you run it yourself but not from transmission?

Exactly!
rednoah wrote:And you made sure the script is called by redirecting output? Try redirecting filebot output (including error output!!!) to a file and see what it says.
Thanks rednoah ! It was actually quite stupid. When launched form Transmission, the script could not find filebot. I just at to specify the exact location, in my case

Code: Select all

/usr/local/bin/filebot

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 03 Nov 2014, 16:24
by iMe
iMe wrote:Hi guys,

There is a way to run a program feature in uTorrent for Mac but you'll have to use it via remote.utorrent.com after you set the login settings in uTorrent preferences

Image

So, can anyone make a tutorial about Mac+uTorrent?
Anyone? :(

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 03 Nov 2014, 21:02
by thanatosa666
I tried using the code but this happened. What do I do? :(

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 04 Nov 2014, 07:02
by rednoah
Why are you passing in your entire filesystem / to filebot for processing?

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 04 Nov 2014, 11:31
by cams
You'll get that response if you run the transmission-postprocess manually.

If you want to test your code, replace the input path from this

Code: Select all

"ut_dir=$TR_TORRENT_DIR/$TR_TORRENT_NAME" "ut_kind=multi" "ut_title=$TR_TORRENT_NAME"
to the input path of the media you want to process (e.g. /Volumes/PC/Downloads)

Sorry if that it is nonsense, I am learning too.
thanatosa666 wrote:I tried using the code but this happened. What do I do?
ATTACHMENTS

Screen Shot 2014-11-03 at 3.58.49 PM.png (19.19 KiB) Viewed 17 times

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 16 Nov 2014, 01:19
by redzep
Sorry to piggy back on this. I might have the same issue: if I wan to run AMC on existing folders of media, I would specify the input path /Volumes/Media/Movies in place of all three ut parameters? in quotes? "/Volumes/Media/Movies" ?

And if I wanted it to rename right then and there, i would just leave out the copy parameter? OR should I leave it and change it to 'move' to give it a separate target directory.

many thanks for any advice!

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 16 Nov 2014, 08:48
by rednoah
Running from cmdline is documented in the manual:
viewtopic.php?f=4&t=215

If you don't set --def excludeList you will get banned. See docs for details.

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 16 Nov 2014, 12:56
by iMe
iMe wrote:
iMe wrote:Hi guys,

There is a way to run a program feature in uTorrent for Mac but you'll have to use it via remote.utorrent.com after you set the login settings in uTorrent preferences

Image

So, can anyone make a tutorial about Mac+uTorrent?
Anyone? :(
Image

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 16 Nov 2014, 13:01
by rednoah
Looks like it's gonna be pretty much exactly the same as on Windows. So what's the problem? What have you tried? What's not working?

:idea: Since there is no tutorial yet, you might as well try figure it out and then write one!

PS: THE WRONG THREAD

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 16 Nov 2014, 15:08
by redzep
I swore I was not going to be another A**hole who didn't read the manual/faq, search other posts etc. before posting. I have studied that page multiple times, and still I missed the --input flag.

I apologize, and thanks for all your hard work. Donation just made.
rednoah wrote:Running from cmdline is documented in the manual:
viewtopic.php?f=4&t=215

If you don't set --def excludeList you will get banned. See docs for details.
EDIT: perhaps include the --input --output parameters in the master list?

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 16 Nov 2014, 17:09
by rednoah
There is no --input parameter, and --output is on every single example.

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 16 Nov 2014, 18:39
by redzep
do i have to give you $5 ever time I'm wrong?

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 16 Nov 2014, 18:43
by rednoah
Yes, it's the law. Not enforced though. :D

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 17 Nov 2014, 03:06
by redzep
rednoah wrote:Yes, it's the law. Not enforced though. :D
I think I will self-enforce anyway. The more I realize how insanely genius your software is.

OK so I'm almost there, if I can prevail upon your help, I will gladly donate more. Here's what I'm running (this is my existing libraries)

filebot -script fn:amc --output /Volumes/Smedens/TV --log-file amc.log --action move --conflict override -non-strict --def deleteAfterExtract=y artwork=y subtitles=en clean=y backdrops=y --def myepisodes=****:****** "movieFormat=/Volumes/Smedens/Movies/{n} ({y})/{n} ({y}) [{certification}]" plex=CountryManse clean=y /Volumes/Smedens/Smedens\ TV --def excludeList=amcsmedens-input.txt

1) clean=y still leaves behind empty folders. Not the biggest deal, but wondering if I'm doing something wrong or clean is just missing them

2) I have been dutifully using def excludeList to not get banned (though I'm not sure from whom or where). However, as I'm fine tuning my setup I am having to run things a few times. When I've got it right, how do i erase the exclusion list to start fresh and process all my files once and for all, without receiving many beatings and lashings?

3) I signed up for myepisodes, and the script appear to have run that paremeter correctly (used hash for my pw) but when I log in I don't see any record of my episodes. Is that not how its supposed to work?

VIELEN DANK FÜR ALLES!

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 17 Nov 2014, 06:49
by rednoah
1.
It shouldn't. Most likely some left over files (that are not on the blacklist) prevent things from being deleted.

@see http://www.filebot.net/forums/viewtopic ... &t=5#p1341

2.
You can use --action test for testing. FileBot is heavily caching data, so you can use it without exclude list safely for 24h hours, especially if you're only running it on a few files. Only if you repeatedly processes the same data, and repeatedly (every day for multiple days in a row) fetch the same data, you will get banned, by the various databases.

3.
MyEpisodes is not well supported, and support may be removed if the scraper breaks again. As far as I know it works, but if it broke, then it's broken for good and "wont fix". :D

@see http://www.filebot.net/forums/viewtopic ... 2629#p2629

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 21 Nov 2014, 12:36
by stooovie
How to use this script with Mac App Store version of FileBot (there doesn't seem to be any other verison for Mac anymore)?

There's no /Applications/Filebot.app/Contents/MacOS/filebot file in the MAS version, so I modified it to /Applications/Filebot.app/Contents/MacOS/FileBotAppLauncher, but it still doesn't work (it just opens the FileBot UI). There's also no AMC log in myhome/.filebot.

what to do? Thanks!

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 21 Nov 2014, 13:15
by rednoah
cmdline tools are not allowed in the Mac App Store. You can use brew cask for installing the filebot cmdline tool instead.

@see viewtopic.php?f=4&t=2061

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 21 Nov 2014, 14:15
by stooovie
Thanks, done that. Now, I presume I need to modify the transmission-postprocess script somehow. Can you tell me how?

Thanks!

EDIT: nevermind, I pointed it to /opt/whatever/filebot.sh and the script now seems to work

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 21 Nov 2014, 14:26
by rednoah
I don't know when /Applications/Filebot.app/Contents/filebot.sh got a thing, but that's a pretty stupid way to call a cmdline tool. It's just filebot in all the examples because it literally is just filebot. You call filebot by calling filebot. Like exactly any single one of my examples, and it works the same on all platforms. That's how cmdline tools work. :D

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 29 Nov 2014, 22:39
by peanutismint
Hey all, I feel like I'm getting closer to having this script run from Transmission on a Mac but I'm still not quite there.

EDIT: SOMEHOW NOW WORKING. REJOICE. But will leave this here for posterity and add a footnote with the now-working code...

Basically, I can run Filebot via CLI and it finds episodes/renames/works brilliantly. However, if I create a bash script as detailed in this thread and set Transmission to run it upon completed download, I either get:

Code: Select all

Failure (°_°)
Conflicting arguments: pass in either file arguments or ut_dir/ut_file parameters but not both
(I have NO idea what this means because that's how we're told to do it in the guide...!!)

OR

Code: Select all

Exclude: /Users/peanutismint/Downloads/whateverfile.mp4
No files selected for processing
Failure (°_°)
(which I think happens when I tried to remove the '"ut_dir=$TR_TORRENT_DIR/$TR_TORRENT_NAME"' etc that I believed caused the first error....



My script is pretty much as described in this thread and looks like this:

Code: Select all

#!/bin/bash
/Applications/FileBot.app/Contents/MacOS/filebot.sh -script fn:amc \
--output "/Users/peanutismint/Downloads" \
--log-file "/Users/peanutismint/Documents/Scripts/amc.log" \
--action copy \
--conflict override -non-strict \
--def artwork=y "ut_dir=$TR_TORRENT_DIR/$TR_TORRENT_NAME" "ut_kind=multi" "ut_title=$TR_TORRENT_NAME"
(I do VERY little coding so I hope I'm using those escapes correctly....!!)

I've updated latest versions of Java/Filebot via CLI as described on that guide page. Anybody know what I'm doing wrong?


EDIT: THE WORKING CODE!

I don't think I changed much - it just randomly started working... Perhaps I was experiencing a server-side error? Anyway, code pretty much the same but I edited slightly so that Filebot just renames my files in place without downloading artwork or creating extra folders etc...

Code: Select all

#!/bin/bash
/Applications/FileBot.app/Contents/MacOS/filebot.sh -script fn:amc \
--output "/Users/Peanut/Downloads" \
--log-file "/Users/Peanut/Documents/Scripts/amc.log" \
--action rename \
--conflict override -non-strict \
--def artwork=n "ut_dir=$TR_TORRENT_DIR/$TR_TORRENT_NAME" "ut_kind=multi"

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 29 Nov 2014, 23:32
by peanutismint
p.s.
rednoah wrote:I don't know when /Applications/Filebot.app/Contents/filebot.sh got a thing, but that's a pretty stupid way to call a cmdline tool. It's just filebot in all the examples because it literally is just filebot. You call filebot by calling filebot. Like exactly any single one of my examples, and it works the same on all platforms. That's how cmdline tools work. :D
It 'got [to be] a thing' because 'just Filebot' doesn't work under OS X :) Although you'll probably say it DOES work, we're just not doing it right because we're all obviously dumb....!! ;)

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 01 Dec 2014, 20:44
by peanutismint
Got it working - see addition to previous post. Sorry if I seemed a little keen...! Tried to 'fix' this for about an hour but turns out it was right...I think...... server issues??

Anyway - awesome script!

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 02 Dec 2014, 03:17
by rednoah
Using --action rename is a really really bad idea. Use copy/duplicate like everyone else, and don't mess with seeding.

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 04 Dec 2014, 20:06
by redzep
Been a while since I could get back to this. Thanks again for all your help. Re: the below
1. i will use hazel to get rid of small leftover folders/files
2. --action test is hugely helpful.
3. MyEpisodes unimportant, just more complications!

so i'm almost there: I've found that for the types of files I have, often obscure and badly named, amc misidentifies tv vs movie too often, so I've set hazel rules to do that initial triage. Then I have two amc scripts run on those two folders, one that forces --def ut label tv, the other forces movie. This works much better, getting very close.

The last bit that seems to be the cause of mismatches is the "Group" command which I can't figure out how it works or how to disable it. But it recently did this:

Group: [tvs:american horror story] => [American.Horror.Story.S04E07.HDTV.x264-KILLERS.eng.srt, American.Horror.Story.S04E07.HDTV.x264-KILLERS.mp4, ESPN The Marinovich Project.mp4, Red Hot Chili Peppers - Behind The Music VH1 2002.mpg]

any idea how to rectify that? Now that I am forcing TV and movies, is Group still important?

More donation coming your way.
rednoah wrote:1.
It shouldn't. Most likely some left over files (that are not on the blacklist) prevent things from being deleted.

@see http://www.filebot.net/forums/viewtopic ... &t=5#p1341

2.
You can use --action test for testing. FileBot is heavily caching data, so you can use it without exclude list safely for 24h hours, especially if you're only running it on a few files. Only if you repeatedly processes the same data, and repeatedly (every day for multiple days in a row) fetch the same data, you will get banned, by the various databases.

3.
MyEpisodes is not well supported, and support may be removed if the scraper breaks again. As far as I know it works, but if it broke, then it's broken for good and "wont fix". :D

@see http://www.filebot.net/forums/viewtopic ... 2629#p2629

Re: [GUIDE] Fully Automated Media Center with Transmission (

Posted: 05 Dec 2014, 04:06
by rednoah
There is no "Group" command. It's part of the logic that's trying to make sense of files, and the output is simply debugging output. In your case it'll probably lead to complications if you have badly named files of different types all in the same folder and process it all in the same run.

Remember that amc is supposed to run on completed downloads, where one can assume that the files passed in logically belong together.