コード例 #1
0
        public AniDB_Anime_DefaultImageVM(JMMServerBinary.Contract_AniDB_Anime_DefaultImage contract)
        {
            this.AniDB_Anime_DefaultImageID = contract.AniDB_Anime_DefaultImageID;
            this.AnimeID         = contract.AnimeID;
            this.ImageParentID   = contract.ImageParentID;
            this.ImageParentType = contract.ImageParentType;
            this.ImageType       = contract.ImageType;

            MoviePoster  = null;
            MovieFanart  = null;
            TVPoster     = null;
            TVFanart     = null;
            TVWideBanner = null;
            TraktPoster  = null;
            TraktFanart  = null;

            if (contract.MovieFanart != null)
            {
                MovieFanart = new MovieDB_FanartVM(contract.MovieFanart);
            }

            if (contract.MoviePoster != null)
            {
                MoviePoster = new MovieDB_PosterVM(contract.MoviePoster);
            }

            if (contract.TVPoster != null)
            {
                TVPoster = new TvDB_ImagePosterVM(contract.TVPoster);
            }

            if (contract.TVFanart != null)
            {
                TVFanart = new TvDB_ImageFanartVM(contract.TVFanart);
            }

            if (contract.TVWideBanner != null)
            {
                TVWideBanner = new TvDB_ImageWideBannerVM(contract.TVWideBanner);
            }

            if (contract.TraktPoster != null)
            {
                TraktPoster = new Trakt_ImagePosterVM(contract.TraktPoster);
            }

            if (contract.TraktFanart != null)
            {
                TraktFanart = new Trakt_ImageFanartVM(contract.TraktFanart);
            }
        }
コード例 #2
0
        public PosterContainer(ImageEntityType imageType, object poster)
        {
            ImageType    = imageType;
            PosterObject = poster;

            switch (ImageType)
            {
            case ImageEntityType.AniDB_Cover:
                AniDB_AnimeVM anime = PosterObject as AniDB_AnimeVM;
                IsImageEnabled    = anime.IsImageEnabled;
                IsImageDisabled   = anime.IsImageDisabled;
                IsImageDefault    = anime.IsImageDefault;
                IsImageNotDefault = anime.IsImageNotDefault;
                PosterSource      = "AniDB";
                break;

            case ImageEntityType.TvDB_Cover:
                TvDB_ImagePosterVM tvPoster = PosterObject as TvDB_ImagePosterVM;
                IsImageEnabled    = tvPoster.IsImageEnabled;
                IsImageDisabled   = tvPoster.IsImageDisabled;
                IsImageDefault    = tvPoster.IsImageDefault;
                IsImageNotDefault = tvPoster.IsImageNotDefault;
                PosterSource      = "TvDB";
                break;

            case ImageEntityType.MovieDB_Poster:
                MovieDB_PosterVM moviePoster = PosterObject as MovieDB_PosterVM;
                IsImageEnabled    = moviePoster.IsImageEnabled;
                IsImageDisabled   = moviePoster.IsImageDisabled;
                IsImageDefault    = moviePoster.IsImageDefault;
                IsImageNotDefault = moviePoster.IsImageNotDefault;
                PosterSource      = "MovieDB";
                break;

            case ImageEntityType.Trakt_Poster:
                Trakt_ImagePosterVM traktPoster = PosterObject as Trakt_ImagePosterVM;
                IsImageEnabled    = traktPoster.IsImageEnabled;
                IsImageDisabled   = traktPoster.IsImageDisabled;
                IsImageDefault    = traktPoster.IsImageDefault;
                IsImageNotDefault = traktPoster.IsImageNotDefault;
                PosterSource      = "Trakt";
                break;
            }
        }
コード例 #3
0
        public AniDB_Anime_DefaultImageVM(JMMServerBinary.Contract_AniDB_Anime_DefaultImage contract)
        {
            this.AniDB_Anime_DefaultImageID = contract.AniDB_Anime_DefaultImageID;
            this.AnimeID = contract.AnimeID;
            this.ImageParentID = contract.ImageParentID;
            this.ImageParentType = contract.ImageParentType;
            this.ImageType = contract.ImageType;

            MoviePoster = null;
            MovieFanart = null;
            TVPoster = null;
            TVFanart = null;
            TVWideBanner = null;
            TraktPoster = null;
            TraktFanart = null;

            if (contract.MovieFanart != null)
                MovieFanart = new MovieDB_FanartVM(contract.MovieFanart);

            if (contract.MoviePoster != null)
                MoviePoster = new MovieDB_PosterVM(contract.MoviePoster);

            if (contract.TVPoster != null)
                TVPoster = new TvDB_ImagePosterVM(contract.TVPoster);

            if (contract.TVFanart != null)
                TVFanart = new TvDB_ImageFanartVM(contract.TVFanart);

            if (contract.TVWideBanner != null)
                TVWideBanner = new TvDB_ImageWideBannerVM(contract.TVWideBanner);

            if (contract.TraktPoster != null)
                TraktPoster = new Trakt_ImagePosterVM(contract.TraktPoster);

            if (contract.TraktFanart != null)
                TraktFanart = new Trakt_ImageFanartVM(contract.TraktFanart);
        }
コード例 #4
0
ファイル: ImageDownloader.cs プロジェクト: dizzydezz/jmm
		public void DownloadTraktPoster(Trakt_ImagePosterVM poster, bool forceDownload)
		{
			if (string.IsNullOrEmpty(poster.ImageURL)) return;

			try
			{
				string url = poster.ImageURL;
				string filename = poster.FullImagePath;

				ImageDownloadRequest req = new ImageDownloadRequest(ImageEntityType.Trakt_Poster, poster, forceDownload);

				// check if this file has already been downloaded and exists
				if (!req.ForceDownload)
				{
					// check to make sure the file actually exists
					if (!File.Exists(poster.FullImagePath))
					{
						this.imagesToDownload.Add(req);
						OnQueueUpdateEvent(new QueueUpdateEventArgs(this.QueueCount));
						return;
					}

					// the file exists so don't download it again
					return;
				}

				this.imagesToDownload.Add(req);
				OnQueueUpdateEvent(new QueueUpdateEventArgs(this.QueueCount));
			}
			catch (Exception ex)
			{
				Utils.ShowErrorMessage(ex);
			}
		}
コード例 #5
0
        public void Populate(JMMServerBinary.Contract_AniDB_AnimeCrossRefs details)
        {
            AnimeID = details.AnimeID;

            CrossRef_AniDB_TvDBV2 = new ObservableCollection <CrossRef_AniDB_TvDBVMV2>();
            TvDBSeriesV2          = new List <TvDB_SeriesVM>();
            TvDBEpisodes          = new List <TvDB_EpisodeVM>();
            TvDBImageFanarts      = new List <TvDB_ImageFanartVM>();
            TvDBImagePosters      = new List <TvDB_ImagePosterVM>();
            TvDBImageWideBanners  = new List <TvDB_ImageWideBannerVM>();

            CrossRef_AniDB_MovieDB = null;
            MovieDB_Movie          = null;
            MovieDBPosters         = new List <MovieDB_PosterVM>();
            MovieDBFanarts         = new List <MovieDB_FanartVM>();

            CrossRef_AniDB_TraktV2 = new ObservableCollection <CrossRef_AniDB_TraktVMV2>();
            TraktShowV2            = new List <Trakt_ShowVM>();
            TraktImageFanarts      = new List <Trakt_ImageFanartVM>();
            TraktImagePosters      = new List <Trakt_ImagePosterVM>();

            CrossRef_AniDB_MAL = new ObservableCollection <CrossRef_AniDB_MALVM>();

            AllPosters = new List <PosterContainer>();
            AllFanarts = new List <FanartContainer>();

            /*CrossRef_AniDB_TvDBV2.Clear();
             * TvDBSeriesV2.Clear();
             * TvDBEpisodes.Clear();
             * TvDBImageFanarts.Clear();
             * TvDBImagePosters.Clear();
             * TvDBImageWideBanners.Clear();
             *
             * CrossRef_AniDB_MovieDB = null;
             * MovieDB_Movie = null;
             * MovieDBPosters.Clear();
             * MovieDBFanarts.Clear();
             *
             * CrossRef_AniDB_TraktV2.Clear();
             * TraktShowV2.Clear();
             * TraktImageFanarts.Clear();
             * TraktImagePosters.Clear();
             *
             * CrossRef_AniDB_MAL = null;
             *
             * AllPosters.Clear();
             * AllFanarts.Clear();*/

            AniDB_AnimeVM anime = null;

            if (MainListHelperVM.Instance.AllAnimeDictionary.ContainsKey(AnimeID))
            {
                anime = MainListHelperVM.Instance.AllAnimeDictionary[AnimeID];
            }

            //AniDB
            AllPosters.Insert(0, new PosterContainer(ImageEntityType.AniDB_Cover, anime));


            // MAL
            if (details.CrossRef_AniDB_MAL != null)
            {
                CrossRef_AniDB_MAL = new ObservableCollection <CrossRef_AniDB_MALVM>();
                foreach (JMMServerBinary.Contract_CrossRef_AniDB_MAL contract in details.CrossRef_AniDB_MAL)
                {
                    CrossRef_AniDB_MAL.Add(new CrossRef_AniDB_MALVM(contract));
                }
            }

            if (CrossRef_AniDB_MAL == null || CrossRef_AniDB_MAL.Count == 0)
            {
                MALCrossRefExists  = false;
                MALCrossRefMissing = true;
            }
            else
            {
                MALCrossRefExists  = true;
                MALCrossRefMissing = false;
            }

            // Trakt
            if (details.CrossRef_AniDB_Trakt != null)
            {
                foreach (JMMServerBinary.Contract_CrossRef_AniDB_TraktV2 contract in details.CrossRef_AniDB_Trakt)
                {
                    CrossRef_AniDB_TraktV2.Add(new CrossRef_AniDB_TraktVMV2(contract));
                }
            }

            if (details.TraktShows != null)
            {
                foreach (JMMServerBinary.Contract_Trakt_Show contract in details.TraktShows)
                {
                    TraktShowV2.Add(new Trakt_ShowVM(contract));
                }
            }

            foreach (JMMServerBinary.Contract_Trakt_ImageFanart contract in details.TraktImageFanarts)
            {
                bool isDefault = false;
                if (anime != null && anime.DefaultFanart != null && anime.DefaultFanart.ImageParentType == (int)ImageEntityType.Trakt_Fanart &&
                    anime.DefaultFanart.ImageParentID == contract.Trakt_ImageFanartID)
                {
                    isDefault = true;
                }

                Trakt_ImageFanartVM traktFanart = new Trakt_ImageFanartVM(contract);
                traktFanart.IsImageDefault    = isDefault;
                traktFanart.IsImageNotDefault = !isDefault;
                TraktImageFanarts.Add(traktFanart);

                AllFanarts.Add(new FanartContainer(ImageEntityType.Trakt_Fanart, traktFanart));
            }

            foreach (JMMServerBinary.Contract_Trakt_ImagePoster contract in details.TraktImagePosters)
            {
                bool isDefault = false;
                if (anime != null && anime.DefaultPoster != null && anime.DefaultPoster.ImageParentType == (int)ImageEntityType.Trakt_Poster &&
                    anime.DefaultPoster.ImageParentID == contract.Trakt_ImagePosterID)
                {
                    isDefault = true;
                }

                Trakt_ImagePosterVM traktPoster = new Trakt_ImagePosterVM(contract);
                traktPoster.IsImageDefault    = isDefault;
                traktPoster.IsImageNotDefault = !isDefault;
                TraktImagePosters.Add(traktPoster);

                AllPosters.Add(new PosterContainer(ImageEntityType.Trakt_Poster, traktPoster));
            }

            if (CrossRef_AniDB_TraktV2 == null || CrossRef_AniDB_TraktV2.Count == 0 || TraktShowV2 == null || TraktShowV2.Count == 0)
            {
                TraktCrossRefExists  = false;
                TraktCrossRefMissing = true;
            }
            else
            {
                TraktCrossRefExists  = true;
                TraktCrossRefMissing = false;
            }

            // TvDB
            if (details.CrossRef_AniDB_TvDB != null)
            {
                foreach (JMMServerBinary.Contract_CrossRef_AniDB_TvDBV2 contract in details.CrossRef_AniDB_TvDB)
                {
                    CrossRef_AniDB_TvDBV2.Add(new CrossRef_AniDB_TvDBVMV2(contract));
                }
            }

            if (details.TvDBSeries != null)
            {
                foreach (JMMServerBinary.Contract_TvDB_Series contract in details.TvDBSeries)
                {
                    TvDBSeriesV2.Add(new TvDB_SeriesVM(contract));
                }
            }

            foreach (JMMServerBinary.Contract_TvDB_Episode contract in details.TvDBEpisodes)
            {
                TvDBEpisodes.Add(new TvDB_EpisodeVM(contract));
            }

            foreach (JMMServerBinary.Contract_TvDB_ImageFanart contract in details.TvDBImageFanarts)
            {
                bool isDefault = false;
                if (anime != null && anime.DefaultFanart != null && anime.DefaultFanart.ImageParentType == (int)ImageEntityType.TvDB_FanArt &&
                    anime.DefaultFanart.ImageParentID == contract.TvDB_ImageFanartID)
                {
                    isDefault = true;
                }

                TvDB_ImageFanartVM tvFanart = new TvDB_ImageFanartVM(contract);
                tvFanart.IsImageDefault    = isDefault;
                tvFanart.IsImageNotDefault = !isDefault;
                TvDBImageFanarts.Add(tvFanart);

                AllFanarts.Add(new FanartContainer(ImageEntityType.TvDB_FanArt, tvFanart));
            }

            foreach (JMMServerBinary.Contract_TvDB_ImagePoster contract in details.TvDBImagePosters)
            {
                bool isDefault = false;
                if (anime != null && anime.DefaultPoster != null && anime.DefaultPoster.ImageParentType == (int)ImageEntityType.TvDB_Cover &&
                    anime.DefaultPoster.ImageParentID == contract.TvDB_ImagePosterID)
                {
                    isDefault = true;
                }

                TvDB_ImagePosterVM tvPoster = new TvDB_ImagePosterVM(contract);
                tvPoster.IsImageDefault    = isDefault;
                tvPoster.IsImageNotDefault = !isDefault;
                TvDBImagePosters.Add(tvPoster);
                AllPosters.Add(new PosterContainer(ImageEntityType.TvDB_Cover, tvPoster));
            }

            foreach (JMMServerBinary.Contract_TvDB_ImageWideBanner contract in details.TvDBImageWideBanners)
            {
                bool isDefault = false;
                if (anime != null && anime.DefaultWideBanner != null && anime.DefaultWideBanner.ImageParentType == (int)ImageEntityType.TvDB_Banner &&
                    anime.DefaultWideBanner.ImageParentID == contract.TvDB_ImageWideBannerID)
                {
                    isDefault = true;
                }

                TvDB_ImageWideBannerVM tvBanner = new TvDB_ImageWideBannerVM(contract);
                tvBanner.IsImageDefault    = isDefault;
                tvBanner.IsImageNotDefault = !isDefault;
                TvDBImageWideBanners.Add(tvBanner);
            }

            if (CrossRef_AniDB_TvDBV2.Count == 0 || TvDBSeriesV2.Count == 0)
            {
                TvDBCrossRefExists  = false;
                TvDBCrossRefMissing = true;
            }
            else
            {
                TvDBCrossRefExists  = true;
                TvDBCrossRefMissing = false;
            }

            // MovieDB
            if (details.CrossRef_AniDB_MovieDB != null)
            {
                CrossRef_AniDB_MovieDB = new CrossRef_AniDB_OtherVM(details.CrossRef_AniDB_MovieDB);
            }

            if (details.MovieDBMovie != null)
            {
                MovieDB_Movie = new MovieDB_MovieVM(details.MovieDBMovie);
            }

            foreach (JMMServerBinary.Contract_MovieDB_Fanart contract in details.MovieDBFanarts)
            {
                bool isDefault = false;
                if (anime != null && anime.DefaultFanart != null && anime.DefaultFanart.ImageParentType == (int)ImageEntityType.MovieDB_FanArt &&
                    anime.DefaultFanart.ImageParentID == contract.MovieDB_FanartID)
                {
                    isDefault = true;
                }

                MovieDB_FanartVM movieFanart = new MovieDB_FanartVM(contract);
                movieFanart.IsImageDefault    = isDefault;
                movieFanart.IsImageNotDefault = !isDefault;
                MovieDBFanarts.Add(movieFanart);
                AllFanarts.Add(new FanartContainer(ImageEntityType.MovieDB_FanArt, movieFanart));
            }

            foreach (JMMServerBinary.Contract_MovieDB_Poster contract in details.MovieDBPosters)
            {
                bool isDefault = false;
                if (anime != null && anime.DefaultPoster != null && anime.DefaultPoster.ImageParentType == (int)ImageEntityType.MovieDB_Poster &&
                    anime.DefaultPoster.ImageParentID == contract.MovieDB_PosterID)
                {
                    isDefault = true;
                }

                MovieDB_PosterVM moviePoster = new MovieDB_PosterVM(contract);
                moviePoster.IsImageDefault    = isDefault;
                moviePoster.IsImageNotDefault = !isDefault;
                MovieDBPosters.Add(moviePoster);
                AllPosters.Add(new PosterContainer(ImageEntityType.MovieDB_Poster, moviePoster));
            }

            if (CrossRef_AniDB_MovieDB == null || MovieDB_Movie == null)
            {
                MovieDBCrossRefExists  = false;
                MovieDBCrossRefMissing = true;
            }
            else
            {
                MovieDBCrossRefExists  = true;
                MovieDBCrossRefMissing = false;
            }
        }
コード例 #6
0
        public void Populate(JMMServerBinary.Contract_AniDB_AnimeCrossRefs details)
        {
            AnimeID = details.AnimeID;

            CrossRef_AniDB_TvDBV2 = new ObservableCollection<CrossRef_AniDB_TvDBVMV2>();
            TvDBSeriesV2 = new List<TvDB_SeriesVM>();
            TvDBEpisodes = new List<TvDB_EpisodeVM>();
            TvDBImageFanarts = new List<TvDB_ImageFanartVM>();
            TvDBImagePosters = new List<TvDB_ImagePosterVM>();
            TvDBImageWideBanners = new List<TvDB_ImageWideBannerVM>();

            CrossRef_AniDB_MovieDB = null;
            MovieDB_Movie = null;
            MovieDBPosters = new List<MovieDB_PosterVM>();
            MovieDBFanarts = new List<MovieDB_FanartVM>();

            CrossRef_AniDB_TraktV2 = new ObservableCollection<CrossRef_AniDB_TraktVMV2>();
            TraktShowV2 = new List<Trakt_ShowVM>();
            TraktImageFanarts = new List<Trakt_ImageFanartVM>();
            TraktImagePosters = new List<Trakt_ImagePosterVM>();

            CrossRef_AniDB_MAL = new ObservableCollection<CrossRef_AniDB_MALVM>();

            AllPosters = new List<PosterContainer>();
            AllFanarts = new List<FanartContainer>();

            /*CrossRef_AniDB_TvDBV2.Clear();
            TvDBSeriesV2.Clear();
            TvDBEpisodes.Clear();
            TvDBImageFanarts.Clear();
            TvDBImagePosters.Clear();
            TvDBImageWideBanners.Clear();

            CrossRef_AniDB_MovieDB = null;
            MovieDB_Movie = null;
            MovieDBPosters.Clear();
            MovieDBFanarts.Clear();

            CrossRef_AniDB_TraktV2.Clear();
            TraktShowV2.Clear();
            TraktImageFanarts.Clear();
            TraktImagePosters.Clear();

            CrossRef_AniDB_MAL = null;

            AllPosters.Clear();
            AllFanarts.Clear();*/

            AniDB_AnimeVM anime = null;
            if (MainListHelperVM.Instance.AllAnimeDictionary.ContainsKey(AnimeID))
                anime = MainListHelperVM.Instance.AllAnimeDictionary[AnimeID];

            //AniDB
            AllPosters.Insert(0, new PosterContainer(ImageEntityType.AniDB_Cover, anime));

            // MAL
            if (details.CrossRef_AniDB_MAL != null)
            {
                CrossRef_AniDB_MAL = new ObservableCollection<CrossRef_AniDB_MALVM>();
                foreach (JMMServerBinary.Contract_CrossRef_AniDB_MAL contract in details.CrossRef_AniDB_MAL)
                    CrossRef_AniDB_MAL.Add(new CrossRef_AniDB_MALVM(contract));
            }

            if (CrossRef_AniDB_MAL == null || CrossRef_AniDB_MAL.Count == 0)
            {
                MALCrossRefExists = false;
                MALCrossRefMissing = true;
            }
            else
            {
                MALCrossRefExists = true;
                MALCrossRefMissing = false;
            }

            // Trakt
            if (details.CrossRef_AniDB_Trakt != null)
            {
                foreach (JMMServerBinary.Contract_CrossRef_AniDB_TraktV2 contract in details.CrossRef_AniDB_Trakt)
                    CrossRef_AniDB_TraktV2.Add(new CrossRef_AniDB_TraktVMV2(contract));
            }

            if (details.TraktShows != null)
            {
                foreach (JMMServerBinary.Contract_Trakt_Show contract in details.TraktShows)
                    TraktShowV2.Add(new Trakt_ShowVM(contract));
            }

            foreach (JMMServerBinary.Contract_Trakt_ImageFanart contract in details.TraktImageFanarts)
            {
                bool isDefault = false;
                if (anime != null && anime.DefaultFanart != null && anime.DefaultFanart.ImageParentType == (int)ImageEntityType.Trakt_Fanart
                    && anime.DefaultFanart.ImageParentID == contract.Trakt_ImageFanartID)
                {
                    isDefault = true;
                }

                Trakt_ImageFanartVM traktFanart = new Trakt_ImageFanartVM(contract);
                traktFanart.IsImageDefault = isDefault;
                traktFanart.IsImageNotDefault = !isDefault;
                TraktImageFanarts.Add(traktFanart);

                AllFanarts.Add(new FanartContainer(ImageEntityType.Trakt_Fanart, traktFanart));
            }

            foreach (JMMServerBinary.Contract_Trakt_ImagePoster contract in details.TraktImagePosters)
            {
                bool isDefault = false;
                if (anime != null && anime.DefaultPoster != null && anime.DefaultPoster.ImageParentType == (int)ImageEntityType.Trakt_Poster
                    && anime.DefaultPoster.ImageParentID == contract.Trakt_ImagePosterID)
                {
                    isDefault = true;
                }

                Trakt_ImagePosterVM traktPoster = new Trakt_ImagePosterVM(contract);
                traktPoster.IsImageDefault = isDefault;
                traktPoster.IsImageNotDefault = !isDefault;
                TraktImagePosters.Add(traktPoster);

                AllPosters.Add(new PosterContainer(ImageEntityType.Trakt_Poster, traktPoster));
            }

            if (CrossRef_AniDB_TraktV2 == null || CrossRef_AniDB_TraktV2.Count == 0 || TraktShowV2 == null || TraktShowV2.Count == 0)
            {
                TraktCrossRefExists = false;
                TraktCrossRefMissing = true;
            }
            else
            {
                TraktCrossRefExists = true;
                TraktCrossRefMissing = false;
            }

            // TvDB
            if (details.CrossRef_AniDB_TvDB != null)
            {
                foreach (JMMServerBinary.Contract_CrossRef_AniDB_TvDBV2 contract in details.CrossRef_AniDB_TvDB)
                {
                    CrossRef_AniDB_TvDBV2.Add(new CrossRef_AniDB_TvDBVMV2(contract));
                }
            }

            if (details.TvDBSeries != null)
            {
                foreach (JMMServerBinary.Contract_TvDB_Series contract in details.TvDBSeries)
                {
                    TvDBSeriesV2.Add(new TvDB_SeriesVM(contract));
                }
            }

            foreach (JMMServerBinary.Contract_TvDB_Episode contract in details.TvDBEpisodes)
                TvDBEpisodes.Add(new TvDB_EpisodeVM(contract));

            foreach (JMMServerBinary.Contract_TvDB_ImageFanart contract in details.TvDBImageFanarts)
            {
                bool isDefault = false;
                if (anime != null && anime.DefaultFanart != null && anime.DefaultFanart.ImageParentType == (int)ImageEntityType.TvDB_FanArt
                    && anime.DefaultFanart.ImageParentID == contract.TvDB_ImageFanartID)
                {
                    isDefault = true;
                }

                TvDB_ImageFanartVM tvFanart = new TvDB_ImageFanartVM(contract);
                tvFanart.IsImageDefault = isDefault;
                tvFanart.IsImageNotDefault = !isDefault;
                TvDBImageFanarts.Add(tvFanart);

                AllFanarts.Add(new FanartContainer(ImageEntityType.TvDB_FanArt, tvFanart));
            }

            foreach (JMMServerBinary.Contract_TvDB_ImagePoster contract in details.TvDBImagePosters)
            {
                bool isDefault = false;
                if (anime != null && anime.DefaultPoster != null && anime.DefaultPoster.ImageParentType == (int)ImageEntityType.TvDB_Cover
                    && anime.DefaultPoster.ImageParentID == contract.TvDB_ImagePosterID)
                {
                    isDefault = true;
                }

                TvDB_ImagePosterVM tvPoster = new TvDB_ImagePosterVM(contract);
                tvPoster.IsImageDefault = isDefault;
                tvPoster.IsImageNotDefault = !isDefault;
                TvDBImagePosters.Add(tvPoster);
                AllPosters.Add(new PosterContainer(ImageEntityType.TvDB_Cover, tvPoster));
            }

            foreach (JMMServerBinary.Contract_TvDB_ImageWideBanner contract in details.TvDBImageWideBanners)
            {
                bool isDefault = false;
                if (anime != null && anime.DefaultWideBanner != null && anime.DefaultWideBanner.ImageParentType == (int)ImageEntityType.TvDB_Banner
                    && anime.DefaultWideBanner.ImageParentID == contract.TvDB_ImageWideBannerID)
                {
                    isDefault = true;
                }

                TvDB_ImageWideBannerVM tvBanner = new TvDB_ImageWideBannerVM(contract);
                tvBanner.IsImageDefault = isDefault;
                tvBanner.IsImageNotDefault = !isDefault;
                TvDBImageWideBanners.Add(tvBanner);
            }

            if (CrossRef_AniDB_TvDBV2.Count == 0 || TvDBSeriesV2.Count == 0)
            {
                TvDBCrossRefExists = false;
                TvDBCrossRefMissing = true;
            }
            else
            {
                TvDBCrossRefExists = true;
                TvDBCrossRefMissing = false;
            }

            // MovieDB
            if (details.CrossRef_AniDB_MovieDB != null)
                CrossRef_AniDB_MovieDB = new CrossRef_AniDB_OtherVM(details.CrossRef_AniDB_MovieDB);

            if (details.MovieDBMovie != null)
                MovieDB_Movie = new MovieDB_MovieVM(details.MovieDBMovie);

            foreach (JMMServerBinary.Contract_MovieDB_Fanart contract in details.MovieDBFanarts)
            {
                bool isDefault = false;
                if (anime != null && anime.DefaultFanart != null && anime.DefaultFanart.ImageParentType == (int)ImageEntityType.MovieDB_FanArt
                    && anime.DefaultFanart.ImageParentID == contract.MovieDB_FanartID)
                {
                    isDefault = true;
                }

                MovieDB_FanartVM movieFanart = new MovieDB_FanartVM(contract);
                movieFanart.IsImageDefault = isDefault;
                movieFanart.IsImageNotDefault = !isDefault;
                MovieDBFanarts.Add(movieFanart);
                AllFanarts.Add(new FanartContainer(ImageEntityType.MovieDB_FanArt, movieFanart));
            }

            foreach (JMMServerBinary.Contract_MovieDB_Poster contract in details.MovieDBPosters)
            {
                bool isDefault = false;
                if (anime != null && anime.DefaultPoster != null && anime.DefaultPoster.ImageParentType == (int)ImageEntityType.MovieDB_Poster
                    && anime.DefaultPoster.ImageParentID == contract.MovieDB_PosterID)
                {
                    isDefault = true;
                }

                MovieDB_PosterVM moviePoster = new MovieDB_PosterVM(contract);
                moviePoster.IsImageDefault = isDefault;
                moviePoster.IsImageNotDefault = !isDefault;
                MovieDBPosters.Add(moviePoster);
                AllPosters.Add(new PosterContainer(ImageEntityType.MovieDB_Poster, moviePoster));
            }

            if (CrossRef_AniDB_MovieDB == null || MovieDB_Movie == null)
            {
                MovieDBCrossRefExists = false;
                MovieDBCrossRefMissing = true;
            }
            else
            {
                MovieDBCrossRefExists = true;
                MovieDBCrossRefMissing = false;
            }
        }