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

Running FileBot from the console, Groovy scripting, shell scripts, etc
donok
Posts: 2
Joined: 31 Oct 2014, 12:14

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

Post 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
iMe
Posts: 3
Joined: 11 Oct 2014, 18:22

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

Post 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? :(
thanatosa666
Posts: 1
Joined: 03 Nov 2014, 21:01

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

Post by thanatosa666 »

I tried using the code but this happened. What do I do? :(
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

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

Post by rednoah »

Why are you passing in your entire filesystem / to filebot for processing?
:idea: Please read the FAQ and How to Request Help.
cams
Posts: 5
Joined: 03 Nov 2014, 14:31

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

Post 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
redzep
Posts: 5
Joined: 16 Nov 2014, 01:13

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

Post 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!
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

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

Post 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.
:idea: Please read the FAQ and How to Request Help.
iMe
Posts: 3
Joined: 11 Oct 2014, 18:22

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

Post 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
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

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

Post 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
:idea: Please read the FAQ and How to Request Help.
redzep
Posts: 5
Joined: 16 Nov 2014, 01:13

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

Post 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?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

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

Post by rednoah »

There is no --input parameter, and --output is on every single example.
:idea: Please read the FAQ and How to Request Help.
redzep
Posts: 5
Joined: 16 Nov 2014, 01:13

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

Post by redzep »

do i have to give you $5 ever time I'm wrong?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

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

Post by rednoah »

Yes, it's the law. Not enforced though. :D
:idea: Please read the FAQ and How to Request Help.
redzep
Posts: 5
Joined: 16 Nov 2014, 01:13

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

Post 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!
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

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

Post 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
:idea: Please read the FAQ and How to Request Help.
stooovie
Posts: 15
Joined: 16 Sep 2013, 09:38

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

Post 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!
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

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

Post 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
:idea: Please read the FAQ and How to Request Help.
stooovie
Posts: 15
Joined: 16 Sep 2013, 09:38

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

Post 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
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

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

Post 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
:idea: Please read the FAQ and How to Request Help.
peanutismint
Posts: 7
Joined: 29 Nov 2014, 22:14

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

Post 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"
Last edited by peanutismint on 01 Dec 2014, 20:43, edited 2 times in total.
peanutismint
Posts: 7
Joined: 29 Nov 2014, 22:14

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

Post 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....!! ;)
peanutismint
Posts: 7
Joined: 29 Nov 2014, 22:14

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

Post 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!
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

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

Post by rednoah »

Using --action rename is a really really bad idea. Use copy/duplicate like everyone else, and don't mess with seeding.
:idea: Please read the FAQ and How to Request Help.
redzep
Posts: 5
Joined: 16 Nov 2014, 01:13

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

Post 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
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

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

Post 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.
:idea: Please read the FAQ and How to Request Help.
Post Reply