Media Center Master community forums
http://forums.MediaCenterMaster.com/

No available poster
http://forums.MediaCenterMaster.com/viewtopic.php?f=9&t=4079
Page 1 of 1

Author:  shicola [ April 8th, 2012, 5:31 am ]
Post subject:  No available poster

In version 2.0.9812.762 there is wrong processing movie poster with my movie fetcher CSFD.

Backdrops are processing corectly.

[13:11:42.015] DEBUG: [F#1] title forced:
MCM: [F#1] No available poster
[13:11:42.028] DEBUG: Has backdrop: True
[13:11:42.028] DEBUG: Backdrop count: 12
MCM: [F#1] Downloading and saving up to 5 backdrops...


In older versions (2.0.7512.614, 1.34, 1.33) it works well.

[12:43:26.715] DEBUG: [F#1] title alt2/orig: Friends with Benefits
[12:43:26.715] DEBUG: [F#1] title forced:
MCM: [F#1] Saved the default movie poster
[12:43:26.748] DEBUG: Has backdrop: True
[12:43:26.748] DEBUG: Backdrop count: 12
MCM: [F#1] Downloading and saving up to 5 backdrops...
.....

in FetchByIDs I do something like:

string[] posters = GetAllPostersTMDB(null, movie.IMDB_ID);
if (posters.Length > 0)
{
System.Drawing.Bitmap bb;
bb = Utils.LoadPictureFromURI(posters[0]);
movie.Poster = Utils.SerializeBitmap(bb);
}

string[] backdrops = GetAllBackdropsTMDB(null, movie.IMDB_ID);
if (backdrops.Length > 0)
{
movie.Backdrop = Utils.SerializeBitmap(Utils.LoadPictureFromURI(backdrops[0]));
movie.Backdrops = backdrops;
}

my fetcher binary is the same with all version.

Author:  Pete [ April 8th, 2012, 7:35 am ]
Post subject:  Re: No available poster  [SOLVED]

Fetchers should not be submitting serialized bitmaps any longer. This slows down many operations, and instead should submit back a URL to the images.

Please see this updated version of the MovieInfo class:
Code:
 [System.Serializable()]
    public class MovieInfo
    {
        public string IMDB_ID = "";
        public string TMDB_ID = "";
        public string CDUniverse_ID = "";

        public string Title
        {
            get
            {
                return this._Title;
            }
            set
            {
                this._Title = value;
                if (string.IsNullOrEmpty(this.Original_Title))
                    this.Original_Title = value;
                if (string.IsNullOrEmpty(this.Local_Title))
                    this.Local_Title = value;
            }
        }

        private string _Title = string.Empty;
        public string Local_Title = "";
        public string Original_Title = "";
        public string Year = "";
        public string Runtime = "";
        public string IMDBscore = "";
        public string MPAArating = "";
        public string[] AllGenres = new string[] { };
        public string Budget = "";
        public string Revenue = "";
        public string Summary = "";
        public string AllCastAndCrew = "";
        public string Studios = "";

        public byte[] Poster = null;
        public byte[] Backdrop = null;
        public string[] Backdrops = new string[] { };

        // Added with plugin system version 2.1
        public string Country = string.Empty;
        public string Language = string.Empty;
        public string ParentalRatingSummary = string.Empty;

        // Added with plugin system version 2.2
        public string PosterURL = string.Empty;
        public string BackdropURL = string.Empty;
        public string NumberOfVotes = string.Empty;
        public string FullMPAA = string.Empty;
        public string FullCertifications = string.Empty;
        public string TagLine = string.Empty;
        public string Outline = string.Empty;
        public string Plot = string.Empty;
        public string Top250 = string.Empty;
        public string Director = string.Empty;
        public string[] Writers = new string[] { };
        public string Awards = string.Empty;
        public string Website = string.Empty;
        public string Trailer = string.Empty;
    }



You should be using:
Code:
        public string PosterURL = string.Empty;
        public string[] Backdrops = new string[] { };



And not:
Code:
        public byte[] Poster = null;
        public byte[] Backdrop = null;
        public string BackdropURL = string.Empty;

Author:  shicola [ April 8th, 2012, 1:49 pm ]
Post subject:  Re: No available poster

Thanks, it works now !

PS: Can I subscribe to some mailing list about API changes ?

Author:  Pete [ April 8th, 2012, 8:07 pm ]
Post subject:  Re: No available poster

shicola wrote:
Can I subscribe to some mailing list about API changes ?
I hadn't thought about it, but it's a good idea.

I renamed the 'Plugin Fetchers' forum to 'Developer Talk'. Click here to subscribe to it and get updates on new posts. I'll try to make it a habit to post anything there that would require plugin developers such as yourself to update your fetcher. :)

Page 1 of 1 All times are UTC - 7 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/