YAMJ / yamj-v2

Yet Another Movie Jukebox (YAMJ) v2
GNU General Public License v3.0
28 stars 11 forks source link

The option to download fanart from www.themoviedb.com #199

Closed Omertron closed 9 years ago

Omertron commented 9 years ago

Original issue 199 created by Omertron on 2008-10-07T18:43:31.000Z:

-Currently i have developed a YAMJ skin with RobinsJ

-Within the skin we use a dynamic details page background for each movie. The background is comprised of fanart from www.themoviedb.com

(example of detail page from our skin) [URL=http://img150.imageshack.us/my.php?image=dscn0371ss3.jpg][IMG]http://img150.imageshack.us/img150/6749/dscn0371ss3.th.jpg[/IMG][/URL]

The fan art is large in size, typically either 1280x720 or 1920x1080.

-I would like to request that YAMJ have a toggle option that when turned on will search and download this fanart. This would NOT REPLACE any of the images and posters currently being downloaded. It would be downloaded in addition to everything done already. Ideally It would be in the same format currently setup for images.

movie-filename_fanart.jpg or movie-filename_background.jpg.

example: if batmanbegins.avi then batmanbegins_fanart.jpg

There are normally multiple images for each movie. They are all in the format of IMDB#.jpg imdb#-1.jpg, imdb#-2.jpg. The first one is always just the imdb #.

The site is brand new, and they are currently working on an API for it. They say the API will be set up in a few weeks. But this is a example of a movie url, and 2 of its fanart url's for download.

----------------Example (www.themoviedb.com)---------------------- Here is a URL to the movie page for batman begins

http://www.themoviedb.org/movie/272

A url to a poster can have slightly different locations. Here is a example of two fanart images for Batman Begins...

http://www.themoviedb.org/image/backdrops/1052/tt0372784-5.jpg

http://www.themoviedb.org/image/backdrops/4004/tt0372784-1.jpg


How we handle tv-show fanart. (if we can't get tv-shows too...movies is a good enough start).

Currently we are getting all our TV fan-art from www.thetvdb.com

Currently each series is given a series ID. Then each tv series page uses that id for its url

Simpsons series page

http://www.thetvdb.com/?tab=series&id=71663&lid=7

Simpsons fan art page..

http://www.thetvdb.com/?tab=seriesfanart&id=71663

Simpsons fanart download examples...

http://www.thetvdb.com/banners/fanart/original/71663-4.jpg

http://www.thetvdb.com/banners/fanart/original/71663-2.jpg

A Dexter fanart download example is...

http://www.thetvdb.com/banners/fanart/original/79349-4.jpg


Hopefully i don't confuse you with this next part BUT.

If it helps or is easier....www.themoviedb.com is still kind of new, it was only created a few weeks ago. There is an older site which they're transfering all the information from. That site is www.meligrove.com and they use a more standardized method of url's. Its currently still viable (thus far) while they work on www.themoviedb.com. (they are both owned and created by the same people).

You can search there for specific movies with the IMDB # right in the path.

---------------Example (www.meligrove.com)---------------- The movie 16 blocks:

movie page: http://www.meligrove.com/movie?id=tt0450232

fanart downloads: http://www.meligrove.com/images/posters/movies/jpg/tt0450232.jpg

and

http://www.meligrove.com/images/posters/movies/jpg/tt0450232-1.jpg


Information on www.meligrove.com's current API

API Information

The API for Meligrove is pretty simple and straightforward. You can use the following link to call and look for any backdrops with matching IMDB id's.

           http://www.meligrove.com/api?imdb=tt0401792

The results are given back in XML with 3 elements. URL, Postcard, and Thumb.

* URL: returns a string with the absolute URL to the full, high

resolution background. Usually 1920x1080 but sometimes 1280x720. * Postcard: returns a string with the absolute URL to the postcard size of 780x436. * Thumb: returns a string with the absolute URL to the thumbnail version size of 230x129.

Known Issues

  1. I'm not returning proper XML response headers right now. This is not likely to cause widespread issues but could with certain parsers. I'm working on fixing this.
Omertron commented 9 years ago

Comment #1 originally posted by Omertron on 2008-10-07T18:45:18.000Z:

oooof...i relized i made a typo.

Its www.themoviedb.org not .com

Omertron commented 9 years ago

Comment #2 originally posted by Omertron on 2008-10-07T18:58:51.000Z:

<empty>

Omertron commented 9 years ago

Comment #3 originally posted by Omertron on 2008-10-09T16:18:31.000Z:

Love to see this functionality to be added for this skin which can open doors to development of new skins as well!

Omertron commented 9 years ago

Comment #4 originally posted by Omertron on 2008-10-09T22:32:51.000Z:

Just throwing my support behind this; with the new robinsjexcal skin it'd be AWESOME if YAMJ could automatically download fanart!

Omertron commented 9 years ago

Comment #5 originally posted by Omertron on 2008-10-09T23:35:39.000Z:

This would be a great feature.

Omertron commented 9 years ago

Comment #6 originally posted by Omertron on 2008-10-10T04:21:09.000Z:

PLEASE!!!!!!!!!!!!

Omertron commented 9 years ago

Comment #7 originally posted by Omertron on 2008-10-10T05:22:03.000Z:

<empty>

Omertron commented 9 years ago

Comment #8 originally posted by Omertron on 2008-10-10T18:20:34.000Z:

This was just announced in the meligrove/themoviedb forums yesterday

We finally have the backdrop API setup. Once I have migrated all of the backdrops from Meligrove uploading backdrops will be disabled and you will be encouraged to use TMDb. I will post an update as to how long Meligrove will stay up for but anyone using the site as a source for backdrops will need to update their code. This is a must in moving forward and keeping things easier to manage for us.

To use the API, just make an IMDb request to the following URL:

http://api.themoviedb.org/backdrop.php?imdb=

So as an example,

http://api.themoviedb.org/backdrop.php?imdb=tt0468569

This returns the same format as the Meligrove so really, there is little work you need to do. Just update the URL and you should be good to go.

Omertron commented 9 years ago

Comment #9 originally posted by Omertron on 2008-10-10T18:21:18.000Z:

you can read the original here...or post any questions to the moderator...

http://www.meligrove.com/forums/topic/49/themoviedborg-backdrop-api/

Omertron commented 9 years ago

Comment #10 originally posted by Omertron on 2008-10-10T19:00:39.000Z:

That's awesome. I just checked out the new API and works well. Question to the users, though. Multiple images are usually returned. Each line is the same image, but with different resolutions. Should we just download the high-res of the first image, or download multiple? I guess it's possible to download all of them, and then store this info with the movie's xml, that way a skin could randomize the image if they so choose.

Also, should rescaling be done at save time? It may not make sense to store a huge file if the resolution of the TV isn't that big in the first place...it would just slow down the PCH load and transition times between pages in YAMJ.

Omertron commented 9 years ago

Comment #11 originally posted by Omertron on 2008-10-10T19:09:28.000Z:

That's awesome. I just checked out the new API and works well. Question to the users, though. Multiple images are usually returned. Each of the items contains multiple urls of the same image but just different resolutions. Should we just download the high-res version of the first Item, or download multiple? I guess it's possible to download all of them, and then store this info with the movie's xml, that way a skin could randomize the image if they so choose.

Also, should rescaling be done at save time? It may not make sense to store a huge file if the resolution of the TV isn't that big in the first place...it would just slow down the PCH load and transition times between pages in YAMJ.

Omertron commented 9 years ago

Comment #12 originally posted by Omertron on 2008-10-10T19:32:01.000Z:

Rescalling would be good... I had been using a batch script i made to resize all of mine to 1280x720. But if YAMJ can do that ahead of time that'd be awsome.

From what i understand, the popcornhour will only output the html as 1280x720 even if you have the popcornhour tv mode at 1080p. So i think if YAMJ could resize each fanart to 1280x720 ahead of time that'd be awsome. Or, perhaps it could be an option toggle in the properties file? Resize fanart = true?

As far as the choice goes...those different resolutions. Are you sure they're all fanart? I know they have posters and dvd covers available too

Omertron commented 9 years ago

Comment #13 originally posted by Omertron on 2008-10-10T19:37:26.000Z:

Yeah, the returned xml may have multiple 's. And each item contains a a

and a . So each Item is different images. But within each item, those different attributes are just references to different resolutions of the same image. URL is high-res, Postcard is medium, and Thumb is itty bitty.
Omertron commented 9 years ago

Comment #14 originally posted by Omertron on 2008-10-10T20:52:54.000Z:

I just took a look...and i see what you mean.

In my personal opinion we'd only have a need for the URL (biggest size)...then have it auto-resized to 1280x720.

But i think it would be better if the resizing was a true/false option in the properties file.

It might be good to have the option to choose wether to grab one URL or all the URL sized images... I can imagine some people (like robinsj) would like various options for each movie and a randomizing. Where as others, don't want all the extra images and would prefer to just have fanart image.

Currently, I'm not sure what anyone would use the or sized images for...but i'm a big fan of having options as you can see...so if its not hard, i say why not give people the choice to include them or not? :)

Another idea is...say you have it only grab one of the size. Probably the first one. But say thats not the one a user wants...would it be a easy thing to make it so that in the nfo file you can specify say fanart=1 for the first item....fanart=2 for the 2nd. Or simply make it so you can insert the address of the fanart you want like you can the poster file?

Omertron commented 9 years ago

Comment #15 originally posted by Omertron on 2008-10-10T20:54:05.000Z:

I just took a look...and i see what you mean.

In my personal opinion we'd only have a need for the URL (biggest size)...then have it auto-resized to 1280x720.

But i think it would be better if the resizing was a true/false option in the properties file.

It might be good to have the option to choose wether to grab one URL or all the URL (largest) sized images... I can imagine some people (like robinsj) would like various options for each movie and a randomizing. Where as others, don't want all the extra images and would prefer to just have one single fanart image.

Currently, I'm not sure what anyone would use the or sized images for...but i'm a big fan of having options as you can see...so if its not hard, i say why not give people the choice to include them or not? :)

Another idea is...say you have it only grab one of the size. Probably the first one. But say thats not the one a user wants...would it be a easy thing to make it so that in the nfo file you can specify say fanart=1 for the first item....fanart=2 for the 2nd. Or simply make it so you can insert the address of the fanart you want like you can the poster file?

Omertron commented 9 years ago

Comment #16 originally posted by Omertron on 2008-10-10T21:04:54.000Z:

Ok. Well, I think we have some good ideas as a starting point. So I think it's best to at least get something going so users have a frame of reference and see how it can work. Then I'm sure additional enhancement requests will come in. :)

Omertron commented 9 years ago

Comment #17 originally posted by Omertron on 2008-10-10T21:06:21.000Z:

also i should say two things..

  1. Before definitly settling on 1280x720 resizing, someone should confirm that the NMT devices will only display html in 1280x720. I had read thats all it can do on the forums. But my tv is only 720p...so i can't even test that theory out. If it can actually display 1920x1080 size html images. Then the option of resizing is important, because people with 1080p tv's will want it left alone. And people with 720p tv's will want it resized.

Also that brings up another discussion. What to do with people with SD tv's. I'm currently developing a SD version of the skin....

So with all that said how difficult would it be to set up the choice of what to resize it to?

  1. I forgot to mention above, my personal vote (if options to do so aren't available). Is to Download 1 single the first one listed, only in the size...and have it resized to 1280x720 upon saving.
Omertron commented 9 years ago

Comment #18 originally posted by Omertron on 2008-10-10T21:10:45.000Z:

Yes i agree altman, i think if we can just get the fanart auto-downloaded as a starting point most people will be quite happy. And then you're right, about 100 requests will follow...lol

Omertron commented 9 years ago

Comment #19 originally posted by Omertron on 2008-10-10T21:25:23.000Z:

@jwelchjr

You are right in that any NMT will display menu's (or menu items such as HTML pages) @ 1280x720 resolution and nothing else. I agree that for starters, download the first listed item, resize to 1280x720 and be done with it.

As it is currently with coverart, if someone does not like the fanart (backdrop), they can download their own, rename it and be done with it!

Omertron commented 9 years ago

Comment #20 originally posted by Omertron on 2008-10-10T22:15:29.000Z:

<empty>

Omertron commented 9 years ago

Comment #21 originally posted by Omertron on 2008-10-11T01:04:13.000Z:

Please take a look at my new post in issue # 59.

I see this issue's solution being a short-term solution, so I would hope that you take my comments under consideration for a longer term solution,

Omertron commented 9 years ago

Comment #22 originally posted by Omertron on 2008-10-11T01:05:52.000Z:

And one more thing, even on a 1080p TV, resolution is no more than 720p displayed. So go ahead and resize to 1080x720, SD users will need to do their own resizing.

Omertron commented 9 years ago

Comment #23 originally posted by Omertron on 2008-10-11T02:18:06.000Z:

I think thats a good suggestion.

Tho i really have no insight as to how the coding for what they're currently doing as opposed to how that xml scraper works. But if its a easy conversion, i think it would help make YAMJ a more customizable and open project in the long run.

To be 100% honest, as long as the fanart is auto-downloaded...i don't care how it happens as long as it works :)

Omertron commented 9 years ago

Comment #24 originally posted by Omertron on 2008-10-12T22:51:15.000Z:

<empty>

Omertron commented 9 years ago

Comment #25 originally posted by Omertron on 2008-10-13T02:18:38.000Z:

This change has been committed, and is really just a first pass. Some new properties have been added to the skin.properties for all of the existing skins:

moviedb.fanart.download=false background.width=1280 background.height=720

mjb.background.plugin=com.moviejukebox.plugin.DefaultBackgroundPlugin

To enable fanart download, toggle the moviedb.fanart.download to "true". The current skins just don't use this right now, so user created skins will have to enable this themselves. The background width and height should be self-explanatory. And the plugin is what does the actual image manipulation and resizing. This can be overridden if you would like to do more complicated imaging. Right now, it simply does resizing and cropping as appropriate based on the width and height.

Two more attributes will now be written to the movie.xml files. and

. So skins utilizing fanart will have the option to reference the which is the location of the locally saved and scaled file. If fanart was not enabled, or if no fanart was found for a given movie, these will have the value of "UNKNOWN" stored in them. Also, it would be up to the skin to detect this and provide a default image instead. This is intended as a first release to get people started and to allow other new ideas and enhancements to come in. Please submit any requests as new ones so they can be tracked separately. Thanks!
Omertron commented 9 years ago

Comment #26 originally posted by Omertron on 2008-10-13T02:48:42.000Z:

Awsome, this sounds really perfect for how i indeded to use it...

Great job.

Omertron commented 9 years ago

Comment #27 originally posted by Omertron on 2008-10-13T04:38:57.000Z:

A couple other things I forgot to mention.

Since the only site it is currently pulling fanart from is themoviedb.org, and it uses the imdb id in its api, this fanart functionality will only work if you have the IMDBPlugin enabled. The other plugins (Allocine and FilmWeb) would need to be modified and appropriate fanart sites used.

The scaled image saved locally and referenced in the attribute should be the same as the base movie filename plus ".fanart.jpg" and located in the same directory as the other poster and thumbnail images. For example: movie = 2001.Space.Odyssey.avi fanart = 2001.Space.Odyssey.fanart.jpg

Omertron commented 9 years ago

Comment #28 originally posted by Omertron on 2008-10-13T06:20:18.000Z:

I thought it was already agreed to be "movie_fanart.jpg", not "movie.fanart.jpg".

Using your implemented method will more likely cause more problems for scripts that want to rename files, since most times '.' is replaced with spaces, or spaces are replaced with '.' Right now, '_' is not found much in naming conventions so it would really be a better choice.

At least that's my vote... I'll see what the forum has to say about it.

Omertron commented 9 years ago

Comment #29 originally posted by Omertron on 2008-10-13T14:19:40.000Z:

YAMJ currently also does used "_" as a separator.