filebot 3.0 and 's

All your suggestions, requests and ideas for future development
Post Reply
part timer
Posts: 181
Joined: 09 May 2012, 23:35

filebot 3.0 and 's

Post 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"}
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: filebot 3.0 and 's

Post 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.
:idea: Please read the FAQ and How to Request Help.
part timer
Posts: 181
Joined: 09 May 2012, 23:35

Re: filebot 3.0 and 's

Post by part timer »

Yeah they both still work with the last 2.64 I was using.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: filebot 3.0 and 's

Post 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.
:idea: Please read the FAQ and How to Request Help.
part timer
Posts: 181
Joined: 09 May 2012, 23:35

Re: filebot 3.0 and 's

Post 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.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: filebot 3.0 and 's

Post 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.
:idea: Please read the FAQ and How to Request Help.
part timer
Posts: 181
Joined: 09 May 2012, 23:35

Re: filebot 3.0 and 's

Post 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)
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: filebot 3.0 and 's

Post 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)}
:idea: Please read the FAQ and How to Request Help.
Post Reply