Force moviedb for only 1 category

Running FileBot from the console, Groovy / FileBot scripting, shell scripts, etc
BillyTheKid
Posts: 26
Joined: 19 Dec 2019, 17:15

Force moviedb for only 1 category

Post by BillyTheKid »

Hi,

I have a working AMC script which is moving 4k Movies, Movies and TV Shows as I would like. I also have it set to move UFC events to their own directory. However my UFC renames are not working correctly as the amc script is matching as tv and movies.

Current script:

Code: Select all

filebot -script fn:amc --output "Z:/Shared Videos/Video" --action duplicate -non-strict "Z:/Shared Videos/Torrent/2_Completed" --log-file amc.log --def excludeList=amc.txt --action test --def movieFormat="{fn =~ /2160p|UHD|4K/ ? '4K Movies' : fn =~ /UFC/ ? 'UFC' : 'Movies'}/{plex.tail}"
I have tried using the forceMovie mode but can't get it it to work.

Code: Select all

filebot -script fn:amc --output "Z:/Shared Videos/Video" --action duplicate -non-strict "Z:/Shared Videos/Torrent/2_Completed" --log-file amc.log --def excludeList=amc.txt --action test --def movieFormat="{fn =~ /2160p|UHD|4K/ ? '4K Movies' : fn =~ /UFC/ ? 'UFC' : 'Movies'}/{plex.tail}" --def forceMovie(f) {label =~ /^(?i:UFC)/ }


Log is attached for first call of script

https://pastebin.com/7jVcU7vi

How can i force moviedb mode for just UFC events and let everything else be dynamic?

I don't want to force movie mode for the whole script as I want one script that will work for all formats within utorrent.

Thanks,
Peter
User avatar
rednoah
The Source
Posts: 21496
Joined: 16 Nov 2011, 08:59

Re: Force moviedb for only 1 category

Post by rednoah »

Option A:
The typical approach would be to hook up the amc script directly to your torrent client, pass along labels, so that you yourself can force movie/series mode via assigning the appropriate labels.


Option B:
If you're it from the command-line, then you'd have to do separate command-line calls for UFC files, and non-UFC files.

e.g.

Code: Select all

--file-filter "fn =~ /UFC/"
:idea: Please read the FAQ and How to Request Help.
BillyTheKid
Posts: 26
Joined: 19 Dec 2019, 17:15

Re: Force moviedb for only 1 category

Post by BillyTheKid »

Hi Rednoah,

I am using the script directly in the torrent client. It's called when the torrent completes.

How can i pass variables to the script?

Can you put me towards a resource which explains this?
User avatar
rednoah
The Source
Posts: 21496
Joined: 16 Nov 2011, 08:59

Re: Force moviedb for only 1 category

Post by rednoah »

Look at any of the examples:
https://www.filebot.net/amc.html

If you're using uT then the first example is right there.
:idea: Please read the FAQ and How to Request Help.
BillyTheKid
Posts: 26
Joined: 19 Dec 2019, 17:15

Re: Force moviedb for only 1 category

Post by BillyTheKid »

Thanks for your help.

Which of the below two options would you recommend?

Code: Select all

filebot -script fn:amc --output "Z:/Shared Videos/Video" --action duplicate -non-strict "Z:/Shared Videos/Torrent/2_Completed" --log-file amc.log --def unsorted=y "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D" excludeList=amc.txt --def movieFormat="{fn =~ /2160p|UHD|4K/ ? '4K Movies' : fn =~ /UFC/ ? 'UFC' : 'Movies'}/{plex.tail}" --filter "ut_file =~ /UFC/" --def ut_label=movie

Code: Select all

filebot -script fn:amc --output "Z:/Shared Videos/Video" --action duplicate -non-strict "Z:/Shared Videos/Torrent/2_Completed" --log-file amc.log --def unsorted=y excludeList=amc.txt --def movieFormat="{fn =~ /2160p|UHD|4K/ ? '4K Movies' : fn =~ /UFC/ ? 'UFC' : 'Movies'}/{plex.tail}" --filter "fn =~ /UFC/" --def ut_label=movie
Would everything bar UFC content process dynamically or would this force all content to be processed as a movie?

Sorry even after reading through the amc script page, my main confusion is how to ensure that only files containing the string *UFC* are forced to be processed as movies, and everything else is run as is.

Thanks in advance.
User avatar
rednoah
The Source
Posts: 21496
Joined: 16 Nov 2011, 08:59

Re: Force moviedb for only 1 category

Post by rednoah »

Well, the first one would be the typical use case. Just have uT call FileBot on each completed download (specifically, only that download, not the entire download folder). In this case, you'd be expected to tag UFC torrents as "Movie" in uT when adding a torrent, manually.

As a second step, you could look into ways to automate uT, e.g. have different torrent watch folders which are automatically assigned different labels. Something like that. Not sure if uT has a good built-in solution for that.


EDIT:

I think UFC support is getting requested more and more often. I'll add an internal auto-detection rule to make sure UFC is always forced into Movie Mode. I'll check back tomorrow.
:idea: Please read the FAQ and How to Request Help.
BillyTheKid
Posts: 26
Joined: 19 Dec 2019, 17:15

Re: Force moviedb for only 1 category

Post by BillyTheKid »

rednoah wrote: 27 Jan 2020, 15:00 Well, the first one would be the typical use case. Just have uT call FileBot on each completed download (specifically, only that download, not the entire download folder). In this case, you'd be expected to tag UFC torrents as "Movie" in uT when adding a torrent, manually.

As a second step, you could look into ways to automate uT, e.g. have different torrent watch folders which are automatically assigned different labels. Something like that. Not sure if uT has a good built-in solution for that.


EDIT:

I think UFC support is getting requested more and more often. I'll add an internal auto-detection rule to make sure UFC is always forced into Movie Mode. I'll check back tomorrow.
You're a hero thank you!
User avatar
rednoah
The Source
Posts: 21496
Joined: 16 Nov 2011, 08:59

Re: Force moviedb for only 1 category

Post by rednoah »

Now, since I don't watch UFC, I'll rely on end users to say if this is indeed the best way to deal with things.

Because TheTVDB does have an UFC entry as well:
https://thetvdb.com/series/ufc-primetim ... s/official

But somehow many users prefer to use TheMovieDB for matching. So I assume it just works better for some reason for these particular files.
:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1246
Joined: 15 May 2014, 16:17

Re: Force moviedb for only 1 category

Post by kim »

FYI:
https://www.themoviedb.org/search/movie ... uage=en-US
https://www.themoviedb.org/search/movie ... uage=en-US
https://www.imdb.com/find?q=UFC%20%20vs ... n_al_tt_mr
https://www.imdb.com/find?q=UFC+Fight+N ... n_al_tt_mr
https://www.ufc.com/events

API?:
https://sportradar.us/sports-data/
Live sport events e.g. hockey games, the FIFA World Cup, the Super Bowl or Formula One races exception: pay-per-view sporting events (e.g. UFC, WWE) and sport DVDs are allowed in the movie section marked as videos.
https://www.themoviedb.org/bible/new_co ... 3e93000004

btw: I don't watch it I'm just helping ;)
BillyTheKid
Posts: 26
Joined: 19 Dec 2019, 17:15

Re: Force moviedb for only 1 category

Post by BillyTheKid »

rednoah wrote: 27 Jan 2020, 18:31 Now, since I don't watch UFC, I'll rely on end users to say if this is indeed the best way to deal with things.

Because TheTVDB does have an UFC entry as well:
https://thetvdb.com/series/ufc-primetim ... s/official

But somehow many users prefer to use TheMovieDB for matching. So I assume it just works better for some reason for these particular files.
I have always used TMDB for UFC, as has everyone i've ever seen post on the subject. It generally works really well. Can get some really odd results, weird folder structures, names, etc, if TVDB is used.

Do you need to amend the source code for filebot to ensure UFC matches as a movie as default?
User avatar
rednoah
The Source
Posts: 21496
Joined: 16 Nov 2011, 08:59

Re: Force moviedb for only 1 category

Post by rednoah »

Yes. Please try the FileBot r7068 (latest beta) package.
viewtopic.php?t=1609
:idea: Please read the FAQ and How to Request Help.
BillyTheKid
Posts: 26
Joined: 19 Dec 2019, 17:15

Re: Force moviedb for only 1 category

Post by BillyTheKid »

rednoah wrote: 28 Jan 2020, 10:49 Yes. Please try the FileBot r7068 (latest beta) package.
viewtopic.php?t=1609
Great thank you, i will give it a test.

Just to be clear, do i just need to replace the jar directory on my existing installation? Or are there any other deployment steps?
User avatar
rednoah
The Source
Posts: 21496
Joined: 16 Nov 2011, 08:59

Re: Force moviedb for only 1 category

Post by rednoah »

Probably best to install with the latest installer package:
https://get.filebot.net/filebot/BETA/
:idea: Please read the FAQ and How to Request Help.
BillyTheKid
Posts: 26
Joined: 19 Dec 2019, 17:15

Re: Force moviedb for only 1 category

Post by BillyTheKid »

rednoah wrote: 28 Jan 2020, 12:42 Probably best to install with the latest installer package:
https://get.filebot.net/filebot/BETA/
I'm currently using the Windows Store version as (I think) I read this was the recommended one.

Should i uninstall that and use the FileBot_4.9.0-portable.zip installer?
User avatar
rednoah
The Source
Posts: 21496
Joined: 16 Nov 2011, 08:59

Re: Force moviedb for only 1 category

Post by rednoah »

You'll have to uninstall all versions of FileBot that you may have installed. Then install only the latest beta.


You will also need a standalone license:
viewtopic.php?t=9517


Please read the last paragraph here for details:
viewtopic.php?t=1609
:idea: Please read the FAQ and How to Request Help.
BillyTheKid
Posts: 26
Joined: 19 Dec 2019, 17:15

Re: Force moviedb for only 1 category

Post by BillyTheKid »

Worked a treat.

Command run;

[2020-01-28 21:41:48] Executing: C:\Users\user\Downloads\FileBot_4.9.0-portable\filebot -script fn:amc --output "Z:/Shared Videos/Video" --action duplicate -non-strict "Z:/Shared Videos/Torrent/2_Completed" --log-file amc.log --def excludeList=amc.txt --def movieFormat="{fn =~ /2160|UHD|4K/ ? '4K Movies' : fn =~ /UFC/ ? 'UFC' : 'Movies'}/{plex.tail}" seriesFormat={plex} unsorted=y

Log file attached;
https://pastebin.com/U68QE7Vd

What do you think? Worked as you expected?
BillyTheKid
Posts: 26
Joined: 19 Dec 2019, 17:15

Re: Force moviedb for only 1 category

Post by BillyTheKid »

I seem to be getting this at the end of every script call;

[DUPLICATE] from [Z:\Shared Videos\Torrent\2_Completed\UFC 198 PPV Werdum vs Miocic HDTV x264-FMN(youtubetomp3.uno).mp4] to [Z:\Shared Videos\Video\UFC\UFC 198 - Werdum vs. Miocic (2016)\UFC 198 - Werdum vs. Miocic (2016).mp4]
Failed to set xattr: NoSuchFileException: Z:\Shared Videos\Video\UFC\UFC 198 - Werdum vs. Miocic (2016)\UFC 198 - Werdum vs. Miocic (2016).mp4:net.filebot.metadata
Processed 1 files
IOException: central directory is empty, can't expand corrupt archive.
Done ヾ(@⌒ー⌒@)ノ

Do you know what the exception points to?

Gmail doesn't seem to be sending mails either.

Full script call;
C:\Users\user\Downloads\FileBot_4.9.0-portable\filebot -script fn:amc --output "Z:/Shared Videos/Video" --action duplicate -non-strict "Z:/Shared Videos/Torrent/2_Completed" --log-file amc.log --def excludeList=amc.txt --def movieFormat="{fn =~ /2160|UHD|4K/ ? '4K Movies' : fn =~ /UFC/ ? 'UFC' : 'Movies'}/{plex.tail}" seriesFormat={plex} unsorted=y --def gmail=<user>:<apppassword>
User avatar
rednoah
The Source
Posts: 21496
Joined: 16 Nov 2011, 08:59

Re: Force moviedb for only 1 category

Post by rednoah »

1.
Well, the UFC movie match looks good to me on first glance.


2.
I've never seen this warning before, so it's probably something generic specific to your setup, most likely related to your network drive being weird:

Code: Select all

IOException: central directory is empty, can't expand corrupt archive.
:arrow: A Google search will likely yield many results.


3.
I recommend using PushBullet for HTML reports. Generally speaking, if email sending fails, then there will be console output with helpful error messages, though these internal warnings may not necessarily appear in the FileBot log file.
:idea: Please read the FAQ and How to Request Help.
BillyTheKid
Posts: 26
Joined: 19 Dec 2019, 17:15

Re: Force moviedb for only 1 category

Post by BillyTheKid »

rednoah wrote: 29 Jan 2020, 07:51 1.
Well, the UFC movie match looks good to me on first glance.


2.
I've never seen this warning before, so it's probably something generic specific to your setup, most likely related to your network drive being weird:

Code: Select all

IOException: central directory is empty, can't expand corrupt archive.
:arrow: A Google search will likely yield many results.


3.
I recommend using PushBullet for HTML reports. Generally speaking, if email sending fails, then there will be console output with helpful error messages, though these internal warnings may not necessarily appear in the FileBot log file.
1. Yep working great.

2. Ok will check that out.

3. From what I can see Pushbullet no longer offer an IOS app, so not an option for me. When running my amc script call from CMD i see no errors or anything in relation to gmail apart from;

Parameter: gmail = *****

Do you know how can i debug this further?

FYI i'd like to make a donation, thanks a lot for your help. How do i do this?
User avatar
rednoah
The Source
Posts: 21496
Joined: 16 Nov 2011, 08:59

Re: Force moviedb for only 1 category

Post by rednoah »

Do you see any email related console output at all? There should be something, whether it be successful or error.

Perhaps you could add a screenshot so we can see what you can see?
:idea: Please read the FAQ and How to Request Help.
BillyTheKid
Posts: 26
Joined: 19 Dec 2019, 17:15

Re: Force moviedb for only 1 category

Post by BillyTheKid »

Full cmd output;
https://pastebin.com/YtExeyp4

Screenshot;
https://imgur.com/a/qZCcRGR

Is the other error preventing the gmail action from running?
BillyTheKid
Posts: 26
Joined: 19 Dec 2019, 17:15

Re: Force moviedb for only 1 category

Post by BillyTheKid »

It's odd as the error seems to relate to a zip archive, but i have none in the target directory...
User avatar
rednoah
The Source
Posts: 21496
Joined: 16 Nov 2011, 08:59

Re: Force moviedb for only 1 category

Post by rednoah »

1.
I've added something for testing:

Code: Select all

--def gmail=test:1234123412341234
And I promptly the the corresponding error output:

Code: Select all

...
Processed 1 files
     [mail] Sending email: [FileBot] Avatar.2009
     [mail] Failed to send email: 535-5.7.8 Username and Password not accepted. Learn more at
     [mail] 535 5.7.8  https://support.google.com/mail/?p=BadCredentials o15sm3754668wra.83 - gsmtp

2.
If you enable full debug logging, you might be more information for the weird "central directory is empty, can't expand corrupt archive" error:

Code: Select all

filebot -script fn:properties --def net.filebot.logging.debug=ALL
:idea: viewtopic.php?t=3913



EDIT:

Nevermind. I'm getting the error as well, but only with release builds. Strange indeed. This will take a while.



EDIT 2:

Email issues fixed with FileBot r7075.
:idea: Please read the FAQ and How to Request Help.
BillyTheKid
Posts: 26
Joined: 19 Dec 2019, 17:15

Re: Force moviedb for only 1 category

Post by BillyTheKid »

Thank you!

Is r7075 available to test as a BETA?

Not sure the connection between the r numbers and the BETA releases; https://get.filebot.net/filebot/BETA/
User avatar
rednoah
The Source
Posts: 21496
Joined: 16 Nov 2011, 08:59

Re: Force moviedb for only 1 category

Post by rednoah »

Yes, the BETA packages have been updated recently and should be on r7075 or above.
:idea: Please read the FAQ and How to Request Help.
Post Reply