Page 1 of 1

Can't always pull everything from IMDB

Posted: 20 Dec 2013, 01:55
by Ithiel
Hi Red,

Found another bug! This was in r1914 (not sure if it's been fixed in the latter - I haven't tested the one you just upped fixing the last bug I found lol)

Code:

Code: Select all

//mynas/media/Movies/{norm = {it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ").replaceAll(/ Ii /, " II ").replaceAll(/ Iii /, " III ").replaceAll(/ Iv /, " IV ").replaceAll(/ Vii /, " VII ").replaceAll(/ Viii /, " VIII ").replaceAll(/ Ix /, " IX ").replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/)}; norm(n)}{if (norm(n) != norm(primaryTitle)) ' ('+norm(primaryTitle)+')'}{fn.contains('3D') || fn.contains('3-D') ? '.'+' 3D':""} ({y}{" $certification"})/{norm(n)}{fn.contains('3D') || fn.contains('3-D') ? '.'+' 3D':""}{fn.contains('Extended') || fn.contains('EXTENDED') || fn.contains('extended.cut') ? ' (Extended)' : fn.contains('Special Edition') || fn.contains('SPECIAL EDITION') || fn.contains('SPECIAL.EDITION') ? ' (Special Edition)' : fn.contains('Unrated') || fn.contains('UNRATED') ? '.'+' (Unrated)': fn.contains('Remastered') || fn.contains('REMASTERED') ? '.'+' (Remastered)':""}{" Part $pi"}{" [$vf $vc $ac $af]"}
(yes, I admit - my naming scheme is starting to get a little bit ridiculous haha)

IMDB: http://akas.imdb.com/title/tt0893401/
Result: Daylight Robbery (2008 )\Daylight Robbery [360p XviD MP3 2ch].avi
Should Be: Daylight Robbery (2008 M)\Daylight Robbery [360p XviD MP3 2ch].avi
Or At Least: Daylight Robbery (2008)\Daylight Robbery [360p XviD MP3 2ch].avi

Most movies are detected properly, such as:
Worked: Cinderella (1950 G)\Cinderella [480p XviD AC3 6ch].avi

But some movies can't find anything. The interesting thing is though that it should only show the 'space' after the year if it finds something, which makes me think that it specifically finds 'blank', rather than 'cant find the field' (if that makes sense.. just a guess tho). I've only had this with IMDB. If it can't find the rating on theTVDB, it properly shows (year) instead of (year ).. It's an IMDB specific mess.

Also, I've noticed that a lot of TV movies & TV specials that are on IMDB don't get detected during a movie search.

For example - it can and rename this:
Could Find on IMDB: Family Guy Presents - It's A Trap (2010 PG-13)\Family Guy Presents - It's A Trap [720p x264 DTS 6ch].mkv

But totally spits chips about this, and I had to use themoviedb instead:
Couldn't Find on IMDB: Family Guy Presents - Something, Something, Something, Dark Side (2009 PG-13)\Family Guy Presents - Something, Something, Something, Dark Side [576p XviD AC3 6ch].avi

For whatever reason the SSSDS special is listed as an 'episode' on IMDB, so FileBot didn't return anything :-/

It'd be nice if there was a 'override and treat it like a movie anyway' thing as IMDB has all these listings of specials, DVD extras, and all that sorta stuff, but FileBot won't have a bar of it if it isn't a 'movie', lol.

Re: Can't always pull everything from IMDB

Posted: 20 Dec 2013, 04:32
by rednoah
1.
Extra space? Paste me the exact part of the format that is relevant for that issue. You probably need to define the ' ' in the {...} so when the binding throws it'll take the string literal with it.

EDIT: {primaryTitle} doesn't work on IMDb. It's always English anyway. In fact, {primaryTitle} wil result in an English-language TheMovieDB lookup by IMDb if you use IMDb (which my fail). Not sure if that's the issue you're talking about.

2.
IMDb ignores non-movies. Because they're more often than not gonna mess with proper movie matches.

Family Guy Presents - Something, Something, Something, Dark Side => "Family Guy: Season 8, Episode 20" => Use TheTVDB

Re: Can't always pull everything from IMDB

Posted: 20 Dec 2013, 07:08
by Ithiel
Hi Red,

1. Where I have this: ({y}{" $certification"})
When it can't find the rating elsewhere, it just shows (2012) or whatever. When it can get a rating, I get (2012 M) or whatever.
For whatever reason, on some IMDB queries, it comes back as (2012 )... there is a space before the ).

It's really annoying - not only because the rating is there in the IMDB description, but because it leaves the silly little space which I have to then go and correct.


1a. Well... it seems to work quite well for me:
Sukai Kurora (Sky Crawlers, The) (2008 PG-13)\Sukai Kurora [720p x264 AC3 6ch].mkv
^ that was done using IMDB. So was this:
Te Wu Mi Cheng (Accidental Spy, The) (2001 PG-13)\Te Wu Mi Cheng [480p DivX MP3 2ch].avi

2. Fair enough, but it seems their database has a few tv movies and specials mis-labled as episodes. The first Family Guy starwars parody was listed as a movie, the third one was as a movie, but that second one gets classed on IMDB as an episode. On TheMovieDB, however, it's classed as a movie and allowed me to correctly rename it. :-/


Cheers.

Re: Can't always pull everything from IMDB

Posted: 20 Dec 2013, 07:42
by rednoah
Give me the TheMovieDB ID or link where the {certification} doesn't seem to work. Just try something like {certification.length()} and see if you really get back Empty String or if the {...} fails.

{certification} is TheMovieDB data. Always. Because IMDb doesn't have an API.

Re: Can't always pull everything from IMDB

Posted: 20 Dec 2013, 10:21
by Ithiel
Oh, ok - so it pulls that bit from TheMovieDB even when I'm using IMDB?

Righto.. here's a few that didn't work:


A Dog's Breakfast (2007 )
http://www.imdb.com/title/tt0796314/?ref_=fn_al_tt_1
http://www.themoviedb.org/movie/18632-a-dog-s-breakfast

Pretender - Island Of The Haunted, The (2001 )
http://www.imdb.com/title/tt0274735/?ref_=fn_al_tt_1 (didn't detect, had to use themoviedb)
http://www.themoviedb.org/movie/27339-t ... he-haunted

Daylight Robbery (2008 )
http://www.imdb.com/title/tt0893401/?ref_=fn_al_tt_1
http://www.themoviedb.org/tv/37039-daylight-robbery

Video Game High School (2012 )
http://www.imdb.com/title/tt2170584/?ref_=fn_al_tt_1 (didn't detect, had to use themoviedb)
http://www.themoviedb.org/movie/213305- ... igh-school

Se-Beun De-I-Jeu (Seven Days) (2007 )
http://www.imdb.com/title/tt0997229/?ref_=fn_al_tt_1
http://www.themoviedb.org/movie/24822-seven-days

Three Caballeros, The (1944 )
http://www.imdb.com/title/tt0038166/?ref_=fn_al_tt_1
http://www.themoviedb.org/movie/15947-t ... caballeros

Once Upon A Forest (1993 )
http://www.imdb.com/title/tt0107745/?ref_=fn_al_tt_1
http://www.themoviedb.org/movie/33539-o ... n-a-forest

Night Skies (2007 )
http://www.imdb.com/title/tt0460883/?ref_=fn_al_tt_2
http://www.themoviedb.org/movie/18040-night-skies

Metropia (2009 )
http://www.imdb.com/title/tt0985058/?ref_=fn_al_tt_1
http://www.themoviedb.org/movie/36800-metropia

Vagabond, The (1916 )
http://www.imdb.com/title/tt0007507/?ref_=fn_al_tt_5
http://www.themoviedb.org/movie/13707-the-vagabond

Invasion Of The Body Snatchers (1956 )
http://www.imdb.com/title/tt0049366/?ref_=fn_al_tt_3
http://www.themoviedb.org/movie/11549-i ... -snatchers


I have noticed that there is a bit of a trend to them - they're all really random movies... like.. 'wtf is this?' kind of random. Not sure if that has anything to do with it, but it can't be a coincidence that they are all really eclectic titles. haha

Re: Can't always pull everything from IMDB

Posted: 20 Dec 2013, 13:30
by rednoah
I guess for these movies nobody ever bothered entering certification into TheMovieDB.

You can do this:

Code: Select all

{imdb.certification}
But because OMDB-API uses a page scraper the values are error prone. So I get "13" as certification. That's why I only trust TMDb. ;)

Or better, try r1931, empty string values will be considered 'undefined' now.

Re: Can't always pull everything from IMDB

Posted: 23 Dec 2013, 04:33
by Ithiel
cool, thanks. so... how would I setup something along the lines of:

if not undefined {" $certification"}
else not undefined {imdb.certification}
(and if {imdb.certification} = 13, return PG-13, along with other similar replacements for other stuff-ups that imdb may return)
else ignore?

Re: Can't always pull everything from IMDB

Posted: 23 Dec 2013, 06:03
by rednoah
Something like this:

Code: Select all

{' '+any{imdb.certification}{certification}.replaceAll(/^\d+$/, 'PG-$0')}
You'll need one of the newer revisions though.

Re: Can't always pull everything from IMDB

Posted: 23 Dec 2013, 06:51
by Ithiel
awesome - thanks mate. that's worked perfectly ^.^