Does the script scrape imdb and tvdb by default?

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
Perry789
Posts: 6
Joined: 15 Jul 2018, 10:05

Does the script scrape imdb and tvdb by default?

Post by Perry789 »

Hi,

Few quick questions about the AMC script if anyone can help.

Does the script scrape imdb and tvdb by default? - Can this be modified to use both if not?
Can it be modified to not scrape at all and just reformat the folders/files in plex friendly format then move into relevant TV Shows or Movies folder?
Can it be configured to send a email notifications only when files are left unsorted?
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC script

Post by rednoah »

1.
The amc script uses TheTVDB and TheMovieDB. FileBot does not support IMDb at all.


2.
You can generic file mode to "reformat" files paths:
viewtopic.php?f=3&t=2072

However, that means you won't have any information other than {fn} in your format, so bindings like {plex} (that require movie / episode information) won't work.

If you want to organize your files for Plex, then you need to match each file with the corresponding database entry, so that you can then use movie / episodes bindings such {n} {y} or {s00e00} or just {plex} in your format.


3.
The amc script has email notifications about what files have been renamed, including the ones renamed with --def unsorted=y behaviour. The specific email behaviour you want is not supported.
:idea: Please read the FAQ and How to Request Help.
Perry789
Posts: 6
Joined: 15 Jul 2018, 10:05

Re: Does the script scrape imdb and tvdb by default?

Post by Perry789 »

Thanks for the reply.
I only ask as I had some files renamed and moved incorrectly, Blue Planet 2 was renamed using the Blue Planet (1986) along with all episodes, is there anyway to help stop this?
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Does the script scrape imdb and tvdb by default?

Post by rednoah »

Perry789 wrote: 16 Jul 2018, 11:57 Thanks for the reply.
I only ask as I had some files renamed and moved incorrectly, Blue Planet 2 was renamed using the Blue Planet (1986) along with all episodes, is there anyway to help stop this?
That seems like a completely different question from the OP. :lol:


1.
There are many ways to make things work better, depending on the situation. The --filter option is explained in the Advanced Fine-Tuning section and might be a good solution here:
viewtopic.php?f=3&t=2127


2.
What command are you using anyway? What options? What exactly does the log say?


3.
This test tells us that "Blue Planet 2" is actually called "Blue Planet II" and unfortunately FileBot does not have implicit understanding of roman numerals:

Code: Select all

$ filebot -rename *.mkv -non-strict --action TEST
Rename episodes using [TheTVDB]
Auto-detected query: [Blue Planet, blue planet 2]
Fetching episode data for [The Blue Planet]
Fetching episode data for [Blue Planet II]
Fetching episode data for [Planet Earth II]
Fetching episode data for [Expedition Blue Planet]
Resource not found: https://api.thetvdb.com/search/series?name=blue+planet+2
[TEST] from [Blue Planet 2 - 1x01.mkv] to [The Blue Planet - 1x01 - Introduction.mkv]
Processed 1 files
:idea: It'll work most of the time, because usually there'd be an official alias, so that both "Star Wars 3" and "Star Wars III" would both be in the database, except that's not the case in this corner case.

A possible solution might be to give FileBot a hint, via the --filter option, to consider only episodes / shows aired after 2010:

Code: Select all

$ filebot -rename *.mkv -non-strict --action TEST --log INFO --filter 'y > 2010'
[TEST] from [Blue Planet 2 - 1x01.mkv] to [Blue Planet II - 1x01 - One Ocean.mkv]
:idea: If you tell FileBot to only consider episodes / shows aired after 2010 and then process episodes before 2010, it will end badly. The --filter option is a double-edged sword that you'll want to use wisely. ;)
:idea: Please read the FAQ and How to Request Help.
Perry789
Posts: 6
Joined: 15 Jul 2018, 10:05

Re: Does the script scrape imdb and tvdb by default?

Post by Perry789 »

Sort of :D

Here's my command:

Code: Select all

cmd /c START /MIN cmd /c filebot -script fn:amc --output "E:/Media" --action move --conflict skip -non-strict --log-file amc.log --def unsorted=y music=y artwork=y "ut_dir=%F" "ut_kind=multi" "ut_title=%N" "ut_label=%L" --def deleteAfterExtract=y --def clean=y
Here's the log:

Code: Select all

Run script [fn:amc] at [Mon Jul 16 10:00:37 BST 2018]
Parameter: unsorted = y
Parameter: music = y
Parameter: artwork = y
Parameter: deleteAfterExtract = y
Parameter: clean = y
Argument[0]: E:\Downloads
Input: E:\Downloads\Blue Planet 2\BBC.Blue.Planet.II.1of7.One.Ocean.1080p.HDTV.x265.AAC.MVGroup.org.mkv
Input: E:\Downloads\Blue Planet 2\BBC.Blue.Planet.II.2of7.The.Deep.1080i.HDTV.h264.AC3.MVGroup.org.ts
Input: E:\Downloads\Blue Planet 2\BBC.Blue.Planet.II.3of7.Coral.Reefs.1080i.HDTV.h264.AC3.MVGroup.org.ts
Input: E:\Downloads\Blue Planet 2\BBC.Blue.Planet.II.4of7.Big.Blue.1080i.HDTV.h264.AC3.MVGroup.org.ts
Input: E:\Downloads\Blue Planet 2\BBC.Blue.Planet.II.5of7.Green.Seas.1080p.HDTV.x265.AAC.MVGroup.org.mkv
Input: E:\Downloads\Blue Planet 2\BBC.Blue.Planet.II.6of7.Coasts.1080i.HDTV.h264.AC3.MVGroup.org.ts
Input: E:\Downloads\Blue Planet 2\BBC.Blue.Planet.II.7of7.Our.Blue.Planet.1080i.HDTV.h264.AC3.MVGroup.org.ts
BBC.Blue.Planet.II.1of7.One.Ocean.1080p.HDTV.x265.AAC.MVGroup.org.mkv [series: Blue Planet, movie: Blue Planet II : One Ocean & The Deep (2018)]
Unable to differentiate: [BBC.Blue.Planet.II.1of7.One.Ocean.1080p.HDTV.x265.AAC.MVGroup.org.mkv] => [Blue Planet] VS [Blue Planet II : One Ocean & The Deep (2018)]
BBC.Blue.Planet.II.2of7.The.Deep.1080i.HDTV.h264.AC3.MVGroup.org.ts [series: Blue Planet, movie: The Blue Planet (1982)]
Exclude Series: Blue Planet
BBC.Blue.Planet.II.3of7.Coral.Reefs.1080i.HDTV.h264.AC3.MVGroup.org.ts [series: Blue Planet, movie: The Blue Planet (1982)]
Exclude Series: Blue Planet
BBC.Blue.Planet.II.4of7.Big.Blue.1080i.HDTV.h264.AC3.MVGroup.org.ts [series: Blue Planet, movie: The Blue Planet (1982)]
Exclude Series: Blue Planet
BBC.Blue.Planet.II.5of7.Green.Seas.1080p.HDTV.x265.AAC.MVGroup.org.mkv [series: Blue Planet, movie: The Blue Planet (1982)]
Exclude Series: Blue Planet
BBC.Blue.Planet.II.6of7.Coasts.1080i.HDTV.h264.AC3.MVGroup.org.ts [series: Blue Planet, movie: The Blue Planet (1982)]
Exclude Series: Blue Planet
BBC.Blue.Planet.II.7of7.Our.Blue.Planet.1080i.HDTV.h264.AC3.MVGroup.org.ts [series: Blue Planet, movie: The Blue Planet (1982)]
Exclude Series: Blue Planet
Group: [:] => [BBC.Blue.Planet.II.1of7.One.Ocean.1080p.HDTV.x265.AAC.MVGroup.org.mkv]
Group: [tvs:null, mov:the blue planet 1982] => [BBC.Blue.Planet.II.2of7.The.Deep.1080i.HDTV.h264.AC3.MVGroup.org.ts, BBC.Blue.Planet.II.3of7.Coral.Reefs.1080i.HDTV.h264.AC3.MVGroup.org.ts, BBC.Blue.Planet.II.4of7.Big.Blue.1080i.HDTV.h264.AC3.MVGroup.org.ts, BBC.Blue.Planet.II.5of7.Green.Seas.1080p.HDTV.x265.AAC.MVGroup.org.mkv, BBC.Blue.Planet.II.6of7.Coasts.1080i.HDTV.h264.AC3.MVGroup.org.ts, BBC.Blue.Planet.II.7of7.Our.Blue.Planet.1080i.HDTV.h264.AC3.MVGroup.org.ts]
Rename movies using [TheMovieDB]
Auto-detect movie from context: [E:\Downloads\Blue Planet 2\BBC.Blue.Planet.II.2of7.The.Deep.1080i.HDTV.h264.AC3.MVGroup.org.ts]
Auto-detect movie from context: [E:\Downloads\Blue Planet 2\BBC.Blue.Planet.II.3of7.Coral.Reefs.1080i.HDTV.h264.AC3.MVGroup.org.ts]
Auto-detect movie from context: [E:\Downloads\Blue Planet 2\BBC.Blue.Planet.II.4of7.Big.Blue.1080i.HDTV.h264.AC3.MVGroup.org.ts]
Auto-detect movie from context: [E:\Downloads\Blue Planet 2\BBC.Blue.Planet.II.5of7.Green.Seas.1080p.HDTV.x265.AAC.MVGroup.org.mkv]
Auto-detect movie from context: [E:\Downloads\Blue Planet 2\BBC.Blue.Planet.II.6of7.Coasts.1080i.HDTV.h264.AC3.MVGroup.org.ts]
Auto-detect movie from context: [E:\Downloads\Blue Planet 2\BBC.Blue.Planet.II.7of7.Our.Blue.Planet.1080i.HDTV.h264.AC3.MVGroup.org.ts]
Failed to read media characteristics: For input string: "3497502.500000"
Failed to read media characteristics: For input string: "3491998.500000"
Failed to read media characteristics: For input string: "3498974.500000"
Failed to read media characteristics: For input string: "3479721.500000"
Failed to read media characteristics: For input string: "3479337.500000"
[MOVE] from [E:\Downloads\Blue Planet 2\BBC.Blue.Planet.II.5of7.Green.Seas.1080p.HDTV.x265.AAC.MVGroup.org.mkv] to [E:\Media\Movies\The Blue Planet (1981)\The Blue Planet (1981).mkv]
[MOVE] from [E:\Downloads\Blue Planet 2\BBC.Blue.Planet.II.2of7.The.Deep.1080i.HDTV.h264.AC3.MVGroup.org.ts] to [E:\Media\Movies\The Blue Planet (1981)\The Blue Planet (1981) CD1.ts]
[MOVE] from [E:\Downloads\Blue Planet 2\BBC.Blue.Planet.II.3of7.Coral.Reefs.1080i.HDTV.h264.AC3.MVGroup.org.ts] to [E:\Media\Movies\The Blue Planet (1981)\The Blue Planet (1981) CD2.ts]
[MOVE] from [E:\Downloads\Blue Planet 2\BBC.Blue.Planet.II.4of7.Big.Blue.1080i.HDTV.h264.AC3.MVGroup.org.ts] to [E:\Media\Movies\The Blue Planet (1981)\The Blue Planet (1981) CD3.ts]
[MOVE] from [E:\Downloads\Blue Planet 2\BBC.Blue.Planet.II.6of7.Coasts.1080i.HDTV.h264.AC3.MVGroup.org.ts] to [E:\Media\Movies\The Blue Planet (1981)\The Blue Planet (1981) CD4.ts]
[MOVE] from [E:\Downloads\Blue Planet 2\BBC.Blue.Planet.II.7of7.Our.Blue.Planet.1080i.HDTV.h264.AC3.MVGroup.org.ts] to [E:\Media\Movies\The Blue Planet (1981)\The Blue Planet (1981) CD5.ts]
Processed 6 files
Fetching movie artwork for [The Blue Planet (1981) [CD4]] to [E:\Media\Movies\The Blue Planet (1981)]
Generate Movie NFO: The Blue Planet [96300]
Fetching E:\Media\Movies\The Blue Planet (1981)\poster.jpg => [posters/1024x1440, it, 5.3125, https://image.tmdb.org/t/p/original/ibKUxfOk8mmccRjeFl35H35eZg2.jpg]
Fetching E:\Media\Movies\The Blue Planet (1981)\fanart.jpg => [backdrops/1280x720, 0.0, https://image.tmdb.org/t/p/original/69osQWs25yvJwXczlTf8t9YEvCO.jpg]
Resource not found: https://webservice.fanart.tv/v3/movies/96300?api_key=780b986b22c35e6f7a134a2f392c2deb
Fanart not found: E:\Media\Movies\The Blue Planet (1981)\clearart.png / hdmovieclearart
Fanart not found: E:\Media\Movies\The Blue Planet (1981)\clearart.png / movieart
Fanart not found: E:\Media\Movies\The Blue Planet (1981)\logo.png / hdmovielogo
Fanart not found: E:\Media\Movies\The Blue Planet (1981)\logo.png / movielogo
Fanart not found: E:\Media\Movies\The Blue Planet (1981)\disc.png / moviedisc
Fanart not found: E:\Media\Movies\The Blue Planet (1981)\disc.png / moviedisc
Fanart not found: E:\Media\Movies\The Blue Planet (1981)\disc.png / moviedisc
Processing 1 unsorted files
[MOVE] from [E:\Downloads\Blue Planet 2\BBC.Blue.Planet.II.1of7.One.Ocean.1080p.HDTV.x265.AAC.MVGroup.org.mkv] to [E:\Media\Unsorted\Blue Planet 2\BBC.Blue.Planet.II.1of7.One.Ocean.1080p.HDTV.x265.AAC.MVGroup.org.mkv]
Processed 1 files
Clean clutter files and empty folders
Delete E:\Downloads\Blue Planet 2
Done ヾ(@⌒ー⌒@)ノ
That's why I asked about the non scrape option, so I could just clean up file names then move them to the correct folder, but then I suppose it wouldn't know if its a movie of tv show. (Oh and 1981 was what it named them lol)
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Does the script scrape imdb and tvdb by default?

Post by rednoah »

1.
You could reformat those filenames, because matching all the components from BBC.Blue.Planet.II.1of7.One.Ocean.1080p.HDTV.x265.AAC.MVGroup.org.mkv would be fairly easy, BUT it would still require you to write all the regular expressions required to match each component, and then produce the new filename based on the old filename. Naturally, that's a one-off task you'd do in the GUI, and not something the amc script does.


2.
There's no automated solution, and the problem isn't just that it's badly named episode files, it's that the amc script doesn't even recognize them as episode files in the first place, and then processes them as movies. You can use --def ut_label=TV to force TV mode, but then it would still not work as explained in (3.) in my previous post. In this case, your only option is to add both --def ut_label=TV to force TV mode and --filter to exclude other similarly named TV shows.
:idea: Please read the FAQ and How to Request Help.
Perry789
Posts: 6
Joined: 15 Jul 2018, 10:05

Re: Does the script scrape imdb and tvdb by default?

Post by Perry789 »

Thanks for the help, some useful tips here.

Does the "ut_title=%N" help with the scraping at all, as I could change any II to 2 that may cause issues while the torrent is downloading. (as the AMC script run on completion)
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Does the script scrape imdb and tvdb by default?

Post by rednoah »

--def "ut_title=%N" isn't used at all for matching. Only the file name matters.

However, you can access your --def name=values in your --filter expression and so a possible solution might look something like this:

Code: Select all

$ filebot -rename *.mkv -non-strict --action TEST --filter 'n == defines.ut_title' --def ut_title="Blue Planet II"
Rename episodes using [TheTVDB]
Auto-detected query: [Blue Planet, blue planet 2]
Fetching episode data for [The Blue Planet]
Fetching episode data for [Blue Planet II]
Fetching episode data for [Planet Earth II]
Fetching episode data for [Expedition Blue Planet]
Apply filter [n == defines.ut_title] on [75] items
Include [Blue Planet II - 1x01 - One Ocean]
Include [Blue Planet II - 1x02 - The Deep]
Include [Blue Planet II - 1x03 - Coral Reefs]
Include [Blue Planet II - 1x04 - Big Blue]
Include [Blue Planet II - 1x05 - Green Seas]
Include [Blue Planet II - 1x06 - Coasts]
Include [Blue Planet II - 1x07 - Our Blue Planet]
Include [Blue Planet II - Special 1 - The Prequel]
Include [Blue Planet II - Special 2 - Blue Planet II Playlists: The Festival of Life, by Annie Mac]
Include [Blue Planet II - Special 3 - Blue Planet II Playlists: Journey to the Poles, by Benji B]
Include [Blue Planet II - Special 4 - Blue Planet II Playlists: Onboard, by Mistajam]
Include [Blue Planet II - Special 5 - Oceans of Wonder]
Include [Blue Planet II - Special 6 - The Making of Blue Planet II]
Include [Blue Planet II - Special 7 - The Best of Blue Planet II]
[TEST] from [Blue Planet 2 - 1x01.mkv] to [Blue Planet II - 1x01 - One Ocean.mkv]
Processed 1 files
:idea: Please read the FAQ and How to Request Help.
Perry789
Posts: 6
Joined: 15 Jul 2018, 10:05

Re: Does the script scrape imdb and tvdb by default?

Post by Perry789 »

Hi rednoah,

I seem to be having a strange thing happen when the command is run by Utorrent.

Command:

Code: Select all

filebot -script fn:amc --output "E:/Media" --action move --conflict skip -non-strict --log-file amc.log --def unsorted=y music=y artwork=y "ut_dir=%F" "ut_kind=multi" "ut_title=%N" "ut_label=%L" --def deleteAfterExtract=y --def clean=y --def plex=localhost:dPpVQckuSA47HiSGTRA6

Log:

Code: Select all

Run script [fn:amc] at [Tue Jul 17 13:25:50 BST 2018]
Parameter: unsorted = y
Parameter: music = y
Parameter: artwork = y
Parameter: ut_dir = KNOPPIX_V7.2.0CD-2013-06-16-EN.iso
Parameter: ut_kind = multi
Parameter: ut_title = KNOPPIX_V7.2.0CD-2013-06-16-EN
Parameter: ut_label = 
Parameter: deleteAfterExtract = y
Parameter: clean = y
Parameter: plex = *****
Ignore disk image: C:\Windows\System32\KNOPPIX_V7.2.0CD-2013-06-16-EN.iso
No files selected for processing
Done ヾ(@⌒ー⌒@)ノ
I know this is an ISO (using for testing) but its looking at the C:\Windows\System32 folder, I guess this is because it is where CMD is located, but the ISO does not download there.
The download directory for Utorrent is set to: E:\Downloads

How can I stop it looking in the incorrect folder?
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Does the script scrape imdb and tvdb by default?

Post by rednoah »

:?: Is this question related to the original post or thread title? :?:

:?: --def ut_dir should be an absolute path. What torrent client / version are you using? Are you using utorrent? Why are you using the qBT command template and not the utorrent command template? :?:


:arrow: If you're using utorrent, then please use the utorrent command template from the amc script manual.


uTorrent:

Code: Select all

--def "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"
qBitTorrent:

Code: Select all

--def "ut_dir=%F" "ut_kind=multi" "ut_title=%N" "ut_label=%L"
:idea: Please read the FAQ and How to Request Help.
Post Reply