Page 1 of 1

filebot 3.0 and 's

Posted: 27 Sep 2012, 10:32
by part timer
Maybe it's something on my end, but I just tried the newest jar and it seems any movie with an apostrophe in the title gets some extra characters thrown into it.

Code: Select all

Don't Tell Mom the Babysitter's Dead
Turns into

Code: Select all

Don&#x27 -t Tell Mom the Babysitter&#x27 -s Dead
Which can be fixed by throwing in a

Code: Select all

.replace('&#x27 -',"'")
But that seems a little unnecessary. Maybe it has to do with my formatting, but it seems to be all movies with apostrophes.

Code: Select all

M:/Video/Movies Temp/Couch Potato/{(n =~ /^[Tt]he / ? n[4..-1]+", The" : n =~ /^[Aa] / ? n[2..-1]+", A" : imdb.name).replace(":",' -').replace(";",' -').replace("/",' ')}{"  [$y]"}{"  [Rated ${imdb.certification}]"}{"  [Voted ${imdb.rating.round()}]"}{"  [IMDB tt${imdbid.pad(7)} ]"}/{"[$sdhd]"}{"  [$hpi]"}{"  [$source]"}{"  [$vc]"}{"  [$ac]"}{"  [$group]"}{"  $fn"}

Re: filebot 3.0 and 's

Posted: 27 Sep 2012, 14:06
by rednoah
{n} is not the same as {imdb.name}. All the {imdb.*} stuff is data coming from www.deanclatworthy.com/imdb, so looks like they're not escaping their JSON response properly. Just gonna delete the {imdb.name} property to eliminate confusion. Also {imdb.certification} can't work since I don't even get that data.

Maybe some of that stuff still worked when I was still using www.imdbapi.com but that's been killed by IMDb.

Re: filebot 3.0 and 's

Posted: 27 Sep 2012, 18:15
by part timer
Yeah they both still work with the last 2.64 I was using.

Re: filebot 3.0 and 's

Posted: 27 Sep 2012, 20:12
by rednoah
Are you sure? Did 2.64 already have the imdb.* binding? Well, you might think its working, because it's caching things quite heavily. It's not a regression bug anyway, and if it's trying to get data from imdbapi it'll fail.

Re: filebot 3.0 and 's

Posted: 13 Oct 2012, 12:38
by part timer
Well those both died after I went to 3.0 and now all of a sudden my imdb.rating is dead too :(
Any idea why? I would like it back.

Thanks
---Update
I just tried a whole bunch of imdb options in the movie formats and the only 2 that work right now are imdbid and imdb.votes
imdb.rating throws a Binding exception error (but apparently only on a little over half the movies I just threw at it. Apparently now some work and some don't.)
Most of the errors say binding error "rating" undefined but about half actually say binding error "imdb" java.lang.nullpointerexception.

So about half look like they are working, about a quarter throw on error and about a quarter throw the other.

Re: filebot 3.0 and 's

Posted: 13 Oct 2012, 12:59
by rednoah
This is the data I get from this unofficial imdb api:
http://www.deanclatworthy.com/imdb/?id=tt1034314

I guess IMDb changed their HTML layout and now that guys scraper can't get the data anymore. That's scrapers, not a stable solution. Maybe it'll work again in a few weeks if the maintainer of that API as time to fix the issue.

Re: filebot 3.0 and 's

Posted: 13 Oct 2012, 13:03
by part timer
But does that explain why it gets it for some movies and has two different errors for the others? Wouldn't it be all or nothing? (If you're going to say they are cached btw, they were all already renamed with filebot so they should all have data then imo)

Re: filebot 3.0 and 's

Posted: 13 Oct 2012, 13:17
by rednoah
Well, there's FileBot caching, but mostly it's the API. Maybe for some of the movies the API returns valid data, for others it just returns N/A. Really depends on what I get back from that API.

So:
NPE => No Movie entry
BindingError => Movie entry, but without rating
Works => Movie entry with rating

Anyway, this kinda sucks, it's far for reliable but it's the best there is since imdb shut down imdbapi...


Well, the other option is just scraping the webpage directly...

Here's an inline mini-scraper that'll get you the imdb rating directly from the imdb movie page grabbing any {number}.{number}/10 pattern:

Code: Select all

{new URL("http://www.imdb.com/title/tt$imdbid").getText(requestProperties:['User-Agent':'Mozilla']).match(/(\d[.]\d)\/10/, 1)}