POSTBUCKET - where random posts in unrelated topics go

Any questions? Need some help?
Post Reply
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

POSTBUCKET - where random posts in unrelated topics go

Post by rednoah »

Please don't post your random problems into the "How about sharing your...?" topics. Create a new topic for every issue/problem.
:idea: Please read the FAQ and How to Request Help.
ntg
Posts: 5
Joined: 06 Mar 2012, 04:47

Re: How about sharing our format expressions?

Post by ntg »

Is there any documentation on the functions/syntax that can be used in the renaming patterns? Is it based on another scripting language, or custom-built for filebot?

My problem of the moment is to name the file with a 720p or 1080p resolution when the video height is different. eg If the black bars are cropped (for an AR other than 16:9), then a vf of 688px should be tagged as 720p (1280x688 ~= 1.85:1), but if vf=800px it should become 1080p (1920x800 ~= 2.39:1)...and any other height should round up to the "main" resolutions of 480p/720p/1080p. I'd love to know if there's an easy way to do this, but I'd also love to see what else I can do with the language.
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How about sharing our format expressions?

Post by rednoah »

ntg wrote:Is there any documentation on the functions/syntax that can be used in the renaming patterns? Is it based on another scripting language, or custom-built for filebot?

My problem of the moment is to name the file with a 720p or 1080p resolution when the video height is different. eg If the black bars are cropped (for an AR other than 16:9), then a vf of 688px should be tagged as 720p (1280x688 ~= 1.85:1), but if vf=800px it should become 1080p (1920x800 ~= 2.39:1)...and any other height should round up to the "main" resolutions of 480p/720p/1080p. I'd love to know if there's an easy way to do this, but I'd also love to see what else I can do with the language.
There is lots of ways to do this, pic one that works for you:
http://filebot.sourceforge.net/forums/v ... =1126#p839

My format expression docs:
http://filebot.sourceforge.net/naming.html

Groovy scripting language:
http://groovy.codehaus.org

You can use the extra stuff FileBot provides for you, or everything Groovy provides, or everything Java provides. So you can do pretty much anything.
:idea: Please read the FAQ and How to Request Help.
ntg
Posts: 5
Joined: 06 Mar 2012, 04:47

Re: POSTBUCKET - where random posts in unrelated topics go

Post by ntg »

Thanks, I have no idea how I missed that when I searched for it...
doctorzoidberg
Posts: 3
Joined: 23 Aug 2012, 16:35

Name matching to wrong show using command line

Post by doctorzoidberg »

Hi,

First I would like to say thanks for all the hard work put into this app, very cool app! It is just the tool needed to get the media library automated. I installed FileBot oh my home server and I am testing using the utorrent post process script file like is shown in the post about that topic. Everything seems to be working as expected, it is copying the shows to the output folder and pulling in the artwork and nfo files correctly.

The only problem I am having is that for some shows it is picking up the wrong show from the tv database (I am currently using TheTVdb). For example, when it is processing files for the show "The League" it is instead matching the show to "The League of Gentlemen." Is there a way to specify which show to match to in the event that it gets multiple shows and chooses the wrong show? I am looking to run this from the command line, in the GUI it would be easy enough to just select the correct show but I need a way to specify this while running from the command line.

I have looked in the forums and documentation and I haven't seen anything that jumped out at me as the solution. I did find the topic where you could override the naming of the show/episodes in the pattern matching however I don't think that will help in this situation as the wrong show is being matched so it would still give me incorrect episode names with the correct show title if I modified that I believe, is that correct?

I am certainly no expert at this but would definitely put together a tutorial on how to set this up once I get it all working.

Thank you!
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Name matching to wrong show using command line

Post by rednoah »

I don't have time to look into this in detail yet.

If it's matching the wrong episodes you can fix it with the --filter option which allows you to exclude episodes from matching.

e.g.

Code: Select all

--filter "y > 2000"
(only match with shows that aired in and after 2001)

Code: Select all

--filter "!(n =~ 'The League of Gentlemen')"
(specifically exclude that show specifically)
:idea: Please read the FAQ and How to Request Help.
doctorzoidberg
Posts: 3
Joined: 23 Aug 2012, 16:35

Re: Name matching to wrong show using command line

Post by doctorzoidberg »

Thanks for the reply! I ill give that a shot and post the results.

One quick question on what you suggest, does the --filter option exclude shows from the set of episodes being matched to or does it ignore the input files matching the exclude expression?

Thanks again!
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Name matching to wrong show using command line

Post by rednoah »

The filter works on episode data being matched to. Normally it'll consider all episodes for all found shows as possible matches and try to find the best combination. With --filter you can exclude certain episodes before any matching as if they were not in the database at all.
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Name matching to wrong show using command line

Post by rednoah »

Tested. Works fine for me.

Code: Select all

E:\testdata>filebot -rename The.League.1x01.avi --action test -non-strict
Filename pattern: [1,00] SxE, [0,00] CWS
Rename episodes using [TheTVDB]
Auto-detected query: [The League]
Fetching episode data for [The League]
Fetching episode data for [The League Of Pan]
Fetching episode data for [The League of Gentlemen]
[TEST] Rename [E:\testdata\The.League.1x01.avi] to [The League - 1x01 - The Draft.avi]
Processed 1 files
If there is lots of clutter in the filename it might throw off the fuzzy logic a bit. Send me your exact file paths so I can try with those.
:idea: Please read the FAQ and How to Request Help.
munch9000
Posts: 7
Joined: 19 Jul 2012, 16:59

Re: Fully Automated Media Center

Post by munch9000 »

I noticed the previous version of this script had stopped working for me, so I just upgraded to filebot 3.0 and switched to this new slightly different syntax in uTorrent. It works great, but one problem I'm having now that I didn't experience before is a terminal/command window poping up each time the script runs. If I'm watching something in XMBC at the time, it will minimize XMBC automatically and show the terminal window. Is there a reason this has changed? Is there any way around that?
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Fully Automated Media Center

Post by rednoah »

No, nothing has changed. FileBot has no control over the cmd window. Maybe there is a way to tell uTorrent not to spawn a new console window?
:idea: Please read the FAQ and How to Request Help.
munch9000
Posts: 7
Joined: 19 Jul 2012, 16:59

Re: Fully Automated Media Center

Post by munch9000 »

Hmmm...very strange. When you run the script, does a new console window pop up for you? This definitely didn't happen for me before with filebot. I'd tried a few other options (therenamer, etc.) before and DID have that problem with them...so I was happy when filebot didn't interrupt anything. I guess there's a chance an automatic uTorrent update broke it at around the same time.
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Fully Automated Media Center

Post by rednoah »

I don't know about focus, but utorrent definitely spawns a cmd window to run the given command. Also there is people that have complained about this issue long before 3.0, but really only the utorrent people can do anything about that since it's the utorrent that runs a cmd window that runs filebot, not the other way around.
:idea: Please read the FAQ and How to Request Help.
gmcclelland
Posts: 2
Joined: 26 Aug 2012, 14:17

Re: Fully Automated Media Center

Post by gmcclelland »

Hi, firstly, running Windows 7 x64, Latest FileBot installed as of this date.

I was having some issues with this script so I traced my steps backwards. I was testing just running filebot from Command Prompt and it wasn't recognising "filebot" as a command.

It turns out that when FileBot added itself to the "Path" System Variable, it added a '\' to the end of the file. Removing this fixed everything up so "filebot" was now recognised as a command. Unsure if this was the correct location to post this, but I thought I'd let someone know. May have just been a problem on my end?

Either way, to resolve the issue I have explained here:

Right click "My Computer" and go to properties.
Click "Advanced System Settings"
Down the bottom of that window will be a button that says "Environment Variables...", open that.
In the second box that says "System Variables" scroll down to select "Path" and click "Edit"
At the end of the box labelled "Variable Value" it should have "C:\Program Files (x86)\FileBot\".
Remove the '\' from the end of the string and click OK.
FileBot will now work as a command.

If this is an issue that isn't just me, I'm just putting this to alert the developer and let others know how to fix the problem.
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Fully Automated Media Center

Post by rednoah »

PATH is automatically adjusted by msi so basically Windows itself updating the %PATH%. With or without \ both works. The reason cmd didn't recognize filebot at first is that it's reading PATH on startup. So if you first start cmd and then install filebot it will use the old PATH and not find anything until you restart cmd.
:idea: Please read the FAQ and How to Request Help.
gmcclelland
Posts: 2
Joined: 26 Aug 2012, 14:17

Re: Fully Automated Media Center

Post by gmcclelland »

Well, fancy that. I must have just not realised that. Thanks for that though.

I can't seem to get uTorrent to run a script after the torrent finishes either. No luck. :P
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Fully Automated Media Center

Post by rednoah »

I donno. What's it doing? In the utorrent log it'll show you exactly what command it's calling, just try pasting that into the cmd and see what happens.
:idea: Please read the FAQ and How to Request Help.
doctorzoidberg
Posts: 3
Joined: 23 Aug 2012, 16:35

Re: Name matching to wrong show using command line

Post by doctorzoidberg »

Hey again,

Your earlier suggestion worked for me and as it turns out the problem was caused by files that had already been renamed. I was running it against a set of folders that I had used another renaming program on previously so most of the episodes had already been renamed to the correct standard. I think the spaces that were added to the file name (ie :The League instead of the.league like when it was originally downloaded) caused the match to the TVdb to choose the wrong show.

I am still in experimental mode with this at the moment but all signs are looking positive. Thanks again for all your hard work on this great application!
trucker
Posts: 4
Joined: 01 Sep 2012, 02:22

Re: Fully Automated Media Center

Post by trucker »

Since updating to the new version the script no longer seems to fetch artwork and info. What could to check to find out why ?
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Fully Automated Media Center

Post by rednoah »

Run it manually in the console and see what happens. Make sure you're running the latest version of filebot with the latest version of this script.
:idea: Please read the FAQ and How to Request Help.
trucker
Posts: 4
Joined: 01 Sep 2012, 02:22

Re: Fully Automated Media Center

Post by trucker »

downloaded the latest version of filebot yesterday and it is using your online script so it should be the latest?
the manual version in the cmd shell behaves the same. also what do I need to add to update the xbmc library running on the same machine. the old version was working perfectly for me until i believe the script was updated for the new filebot version
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Fully Automated Media Center

Post by rednoah »

1. Then it should both be the latest. Send me the console output and I'll have a look what's happening.

2. Just add the XBMC host like like it says in the options docs, i.e. --def xbmc=localhost
:idea: Please read the FAQ and How to Request Help.
trucker
Posts: 4
Joined: 01 Sep 2012, 02:22

Re: Fully Automated Media Center

Post by trucker »

this is the output i get when run manually

Code: Select all

G:\PortableApps\ConsolePortable>filebot -script fn:utorrent-postprocess "K:\Downloads\Movies\Tinker Tailor Soldier Spy 2011 R5 DVDRip XviD AC3-26K/" --output "L:/Public/Video" --action copy --conflict skip -non-strict
Input: K:\Downloads\Movies\Tinker Tailor Soldier Spy 2011 R5 DVDRip XviD AC3-26K\Tinker Tailor Soldier Spy.avi
Tinker Tailor Soldier Spy.avi [series: null, movie: Tinker Tailor Soldier Spy (2011)]
Group: [tvs:null, mov:Tinker Tailor Soldier Spy (2011), anime:null] => [Tinker Tailor Soldier Spy.avi]
Rename movies using [TheMovieDB]
Looking up movie by filehash via [TheMovieDB]
TheMovieDB: Hash lookup not supported
[COPY] Rename [K:\Downloads\Movies\Tinker Tailor Soldier Spy 2011 R5 DVDRip XviD AC3-26K\Tinker Tailor Soldier Spy.avi] to [L:\Public\Video\Movies\Tinker Tailor Soldier Spy (2011)\Tinker Tailor Soldier Spy (2011).avi]
Processed 1 files
Done ?(?????)?
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Fully Automated Media Center

Post by rednoah »

Sorry, it's disabled by default in the script. I forgot to add the options to enable it in the CLI usage:

Code: Select all

--def subtitles=y artwork=y
:idea: Please read the FAQ and How to Request Help.
trucker
Posts: 4
Joined: 01 Sep 2012, 02:22

Re: Fully Automated Media Center

Post by trucker »

thanks it is all working perfectly again now
Post Reply