private void AddToFilmstrip(GUIFacadeControl facade, Latest latests, int x)
        {
            try
            {
                Utils.LoadImage(latests.Thumb, ref imagesThumbs);

                //Add to filmstrip
                GUIListItem item = new GUIListItem();
                item.ItemId          = x;
                item.IconImage       = latests.Thumb;
                item.IconImageBig    = latests.Thumb;
                item.ThumbnailImage  = latests.Thumb;
                item.Label           = latests.Title;
                item.Label2          = latests.Genre;
                item.Label3          = latests.DateAdded;
                item.IsFolder        = false;
                item.DVDLabel        = latests.Fanart;
                item.OnItemSelected += new GUIListItem.ItemSelectedHandler(item_OnItemSelected);
                if (facade != null)
                {
                    facade.Add(item);
                }
                facadeCollection.Add(item);
                if (x == 1)
                {
                    UpdateSelectedProperties(item);
                }
            }
            catch (Exception ex)
            {
                logger.Error("AddToFilmstrip: " + ex.ToString());
            }
        }
Beispiel #2
0
        private void AddToFilmstrip(Latest latests, int x)
        {
            try
            {
                //Add to filmstrip
                Utils.LoadImage(latests.Thumb, ref imagesThumbs);

                GUIListItem item = new GUIListItem();
                item.ItemId          = x;
                item.IconImage       = latests.Thumb;
                item.IconImageBig    = latests.Thumb;
                item.ThumbnailImage  = latests.Thumb;
                item.Label           = latests.Title;
                item.Label2          = latests.DateAdded;
                item.IsFolder        = false;
                item.DVDLabel        = latests.Fanart;
                item.OnItemSelected += new GUIListItem.ItemSelectedHandler(item_OnItemSelected);

                facadeCollection.Add(item);
            }
            catch (Exception ex)
            {
                logger.Error("AddToFilmstrip: " + ex.ToString());
            }
        }
Beispiel #3
0
        private void AddToFilmstrip(Latest latests, int x)
        {
            try
            {
                //Add to filmstrip
                IMDBMovie movie = new IMDBMovie();
                movie.Title = latests.Title;
                movie.File  = string.Empty;
                try
                {
                    movie.RunTime = Int32.Parse(latests.Runtime);
                }
                catch
                {
                    movie.RunTime = 0;
                }
                try
                {
                    movie.Year = Int32.Parse(latests.Year);
                }
                catch
                {
                    movie.Year = 0;
                }
                movie.DVDLabel = latests.Fanart;
                movie.Rating   = latests.RoundedRating;
                movie.Watched  = 0;

                Utils.LoadImage(latests.Thumb, ref imagesThumbs);

                GUIListItem item = new GUIListItem();
                item.ItemId          = x;
                item.IconImage       = latests.Thumb;
                item.IconImageBig    = latests.Thumb;
                item.ThumbnailImage  = latests.Thumb;
                item.Label           = movie.Title;
                item.Label2          = latests.Genre;
                item.Label3          = latests.DateAdded;
                item.IsFolder        = false;
                item.Path            = movie.File;
                item.Duration        = movie.RunTime; // *60;
                item.AlbumInfoTag    = movie;
                item.Year            = movie.Year;
                item.DVDLabel        = movie.DVDLabel;
                item.Rating          = movie.Rating;
                item.Path            = latests.Summary;
                item.IsPlayed        = movie.Watched > 0 ? true : false;
                item.OnItemSelected += new GUIListItem.ItemSelectedHandler(item_OnItemSelected);

                facadeCollection.Add(item);
            }
            catch (Exception ex)
            {
                logger.Error("AddToFilmstrip: " + ex.ToString());
            }
        }
Beispiel #4
0
        private void AddToFilmstrip(Latest latests, int x)
        {
            try
            {
                //Add to filmstrip
                MusicTag mt = new MusicTag();
                mt.Album       = latests.Album;
                mt.Artist      = latests.Artist;
                mt.AlbumArtist = latests.Artist;
                mt.FileName    = latests.Subtitle;
                mt.Genre       = latests.Genre;
                try
                {
                    mt.Duration = Int32.Parse(latests.Runtime);
                }
                catch
                {
                    mt.Duration = 0;
                }
                try
                {
                    mt.Year = Int32.Parse(latests.Year);
                }
                catch
                {
                    mt.Year = 0;
                }
                mt.Rating = latests.RoundedRating;

                Utils.LoadImage(latests.Thumb, ref imagesThumbs);

                GUIListItem item = new GUIListItem();
                item.ItemId          = x;
                item.IconImage       = latests.Thumb; // .seasonIndex; // Artist Thumb
                item.IconImageBig    = latests.Thumb; // .episodeIndex; // Album Thumb
                item.ThumbnailImage  = latests.Thumb; // .thumbSeries; // Track Thumb
                item.Label           = mt.Artist;
                item.Label2          = mt.Album;
                item.Label3          = latests.DateAdded;
                item.IsFolder        = false;
                item.Path            = latests.Genre;
                item.Duration        = mt.Duration;
                item.MusicTag        = mt;
                item.Year            = mt.Year;
                item.DVDLabel        = latests.Fanart;
                item.Rating          = mt.Rating;
                item.OnItemSelected += new GUIListItem.ItemSelectedHandler(item_OnItemSelected);

                facadeCollection.Add(item);
            }
            catch (Exception ex)
            {
                logger.Error("AddToFilmstrip: " + ex.ToString());
            }
        }
Beispiel #5
0
 internal MQTTItem(Latest item)
 {
     this.Id       = item.DBId;
     this.Title    = item.Title + (!string.IsNullOrEmpty(item.Year) ? " (" + item.Year + ")" : string.Empty);
     this.AirDate  = item.DateTimeAdded.ToString("yyyy-MM-ddTHH:mm:ssZ");
     this.Release  = "$day, $date $time";
     this.Episode  = item.Subtitle;
     this.Number   = (!string.IsNullOrEmpty(item.SeasonIndex + item.EpisodeIndex) ? string.Format("S{0}E{1}", item.SeasonIndex, item.EpisodeIndex) : string.Empty);
     this.Genres   = item.Genre.Trim(',') ?? string.Empty;
     this.Rating   = item.DoubleRating;
     this.Studio   = item.Studios;
     this.Aired    = string.Empty;
     this.Runtime  = item.Runtime;
     this.Poster   = item.Thumb;
     this.Fanart   = item.Fanart;
     this.Flag     = item.IsNew;
     this.Filename = string.Empty;
 }