public static void SetBackground(int index, IMyCollectionsData entity)
        {
            ResourcesType backgroundType = CommonServices.GetRessourceType("Background");
            ResourcesType imageType      = CommonServices.GetRessourceType("Image");

            foreach (Ressource item in entity.Ressources)
            {
                if (item.ResourcesType.Id == backgroundType.Id)
                {
                    item.ResourcesType = imageType;
                    break;
                }
            }

            Ressource image = entity.Ressources[index];

            image.ResourcesType.Id   = backgroundType.Id;
            image.ResourcesType.Name = backgroundType.Name;
            image.ResourcesType      = backgroundType;
        }
        public static void AddBackground(byte[] objImage, IMyCollectionsData entity)
        {
            if (objImage == null)
            {
                return;
            }

            Ressource objRessource = new Ressource();

            objRessource.IsDefault     = false;
            objRessource.ItemId        = entity.Id;
            objRessource.ResourcesType = CommonServices.GetRessourceType("Background");
            objRessource.Value         = objImage;

            if (entity.Ressources == null)
            {
                entity.Ressources = new List <Ressource>();
            }

            entity.Ressources.Add(objRessource);
        }
Exemplo n.º 3
0
        public void GetInfoFromWeb(IMyCollectionsData item)
        {
            Apps objEntity = item as Apps;

            if (objEntity == null)
            {
                return;
            }

            bool bFind = false;

            if (objEntity.IsComplete == false)
            {
                string strSearch = objEntity.Title.Trim();

                if (MySettings.CleanTitle == true)
                {
                    strSearch = Util.CleanExtensions(strSearch);
                }

                if (string.IsNullOrEmpty(objEntity.Version) == false)
                {
                    strSearch += " " + objEntity.Version.Trim();
                }

                string search = strSearch;
                Task.Factory.StartNew(() => Util.NotifyEvent("getInfoFromWeb: Apps : " + search));

                Hashtable objResults = null;

                #region Amazon US
                if (MySettings.EnableAmazonApps == true)
                {
                    Collection <PartialMatche> results = AmazonServices.Search(strSearch, string.Empty, AmazonIndex.Software, AmazonCountry.com, AmazonBrowserNode.None);

                    if (results != null && results.Any())
                    {
                        objResults = AmazonServices.Parse(results[0].Link, AmazonCountry.com, !string.IsNullOrWhiteSpace(objEntity.BarCode), AmazonIndex.Software, string.Empty);
                    }

                    if (objResults != null)
                    {
                        bFind = Fill(objResults, objEntity);
                    }
                }
                #endregion
                #region Amazon FR
                if (bFind == false && MySettings.EnableAmazonFrApps == true)
                {
                    Collection <PartialMatche> results = AmazonServices.Search(strSearch, string.Empty, AmazonIndex.Software, AmazonCountry.fr, AmazonBrowserNode.None);

                    if (results != null && results.Any())
                    {
                        objResults = AmazonServices.Parse(results[0].Link, AmazonCountry.fr, !string.IsNullOrWhiteSpace(objEntity.BarCode), AmazonIndex.Software, string.Empty);
                    }

                    if (objResults != null)
                    {
                        bFind = Fill(objResults, objEntity);
                    }
                }
                #endregion
                #region Amazon DE
                if (bFind == false && MySettings.EnableAmazonDeApps == true)
                {
                    Collection <PartialMatche> results = AmazonServices.Search(strSearch, string.Empty, AmazonIndex.Software, AmazonCountry.de, AmazonBrowserNode.None);

                    if (results != null && results.Any())
                    {
                        objResults = AmazonServices.Parse(results[0].Link, AmazonCountry.de, !string.IsNullOrWhiteSpace(objEntity.BarCode), AmazonIndex.Software, string.Empty);
                    }

                    if (objResults != null)
                    {
                        bFind = Fill(objResults, objEntity);
                    }
                }
                #endregion
                #region Amazon IT
                if (bFind == false && MySettings.EnableAmazonItApps == true)
                {
                    Collection <PartialMatche> results = AmazonServices.Search(strSearch, string.Empty, AmazonIndex.Software, AmazonCountry.it, AmazonBrowserNode.None);

                    if (results != null && results.Any())
                    {
                        objResults = AmazonServices.Parse(results[0].Link, AmazonCountry.it, !string.IsNullOrWhiteSpace(objEntity.BarCode), AmazonIndex.Software, string.Empty);
                    }

                    if (objResults != null)
                    {
                        bFind = Fill(objResults, objEntity);
                    }
                }
                #endregion
                #region Amazon CN
                if (bFind == false && MySettings.EnableAmazonCnApps == true)
                {
                    Collection <PartialMatche> results = AmazonServices.Search(strSearch, string.Empty, AmazonIndex.Software, AmazonCountry.cn, AmazonBrowserNode.None);

                    if (results != null && results.Any())
                    {
                        objResults = AmazonServices.Parse(results[0].Link, AmazonCountry.cn, !string.IsNullOrWhiteSpace(objEntity.BarCode), AmazonIndex.Software, string.Empty);
                    }

                    if (objResults != null)
                    {
                        bFind = Fill(objResults, objEntity);
                    }
                }
                #endregion
                #region Amazon ES
                if (bFind == false && MySettings.EnableAmazonSpApps == true)
                {
                    Collection <PartialMatche> results = AmazonServices.Search(strSearch, string.Empty, AmazonIndex.Software, AmazonCountry.es, AmazonBrowserNode.None);

                    if (results != null && results.Any())
                    {
                        objResults = AmazonServices.Parse(results[0].Link, AmazonCountry.es, !string.IsNullOrWhiteSpace(objEntity.BarCode), AmazonIndex.Software, string.Empty);
                    }

                    if (objResults != null)
                    {
                        bFind = Fill(objResults, objEntity);
                    }
                }
                #endregion
                if (bFind == false && MySettings.EnableSoftonicApps == true)
                {
                    Collection <PartialMatche> results = SoftTonicServices.Search(strSearch);

                    if (results != null && results.Any())
                    {
                        objResults = SoftTonicServices.Parse(results[0].Link);
                    }

                    if (objResults != null)
                    {
                        bFind = Fill(objResults, objEntity);
                    }
                }
                if (bFind == false && MySettings.EnableSoftpedia == true)
                {
                    Collection <PartialMatche> results = SoftpediaServices.Search(strSearch);

                    if (results != null && results.Any())
                    {
                        objResults = SoftpediaServices.Parse(results[0].Link, strSearch);
                    }

                    if (objResults != null)
                    {
                        bFind = Fill(objResults, objEntity);
                    }
                }

                if (bFind == false && MySettings.EnableTucows == true)
                {
                    Collection <PartialMatche> results = TucowsServices.Search(strSearch);

                    if (results != null && results.Any())
                    {
                        objResults = TucowsServices.Parse(results[0].Link, strSearch);
                    }

                    if (objResults != null)
                    {
                        bFind = Fill(objResults, objEntity);
                    }
                }

                CommonServices.Update(objEntity);
            }
        }
Exemplo n.º 4
0
        public void GetInfoFromWeb(IMyCollectionsData item)
        {
            Nds objEntity = item as Nds;

            if (objEntity == null)
            {
                return;
            }

            bool bFind = false;

            if (objEntity.IsComplete == false)
            {
                string strSearch = objEntity.Title;

                if (MySettings.CleanTitle == true)
                {
                    strSearch = Util.CleanExtensions(strSearch);
                }

                string search = strSearch;
                Task.Factory.StartNew(() => Util.NotifyEvent("getInfoFromWeb: NDS : " + search));
                Hashtable objResults = null;
                #region TheGamesDB
                if (MySettings.EnableGamesDBNds == true)
                {
                    Collection <PartialMatche> results = TheGamesDbServices.Search(strSearch, GamesPlateform.Nds);

                    if (results != null && results.Any())
                    {
                        objResults = TheGamesDbServices.Parse(results[0].Link);
                    }

                    if (objResults != null)
                    {
                        objEntity = Fill(objResults, objEntity, ref bFind);
                    }
                }
                #endregion
                #region JeuxVideo
                if (bFind == false && MySettings.EnableJeuxVideoNds == true)
                {
                    Collection <PartialMatche> results = JeuxVideoComServices.Search(strSearch, "nintendo-ds");

                    if (results != null && results.Any())
                    {
                        objResults = JeuxVideoComServices.Parse(results[0].Link, strSearch);
                    }

                    if (objResults != null)
                    {
                        objEntity = Fill(objResults, objEntity, ref bFind);
                    }
                }
                #endregion
                #region Amazon US
                if (bFind == false && MySettings.EnableAmazonNds == true)
                {
                    Collection <PartialMatche> results = AmazonServices.Search(strSearch, string.Empty, AmazonIndex.VideoGames, AmazonCountry.com, AmazonBrowserNode.DSUs);

                    if (results != null && results.Any())
                    {
                        objResults = AmazonServices.Parse(results[0].Link, AmazonCountry.com, !string.IsNullOrWhiteSpace(objEntity.BarCode), AmazonIndex.VideoGames, string.Empty);
                    }

                    if (objResults != null)
                    {
                        objEntity = Fill(objResults, objEntity, ref bFind);
                    }
                }
                #endregion
                #region Amazon FR
                if (bFind == false && MySettings.EnableAmazonFrNds == true)
                {
                    Collection <PartialMatche> results = AmazonServices.Search(strSearch, string.Empty, AmazonIndex.VideoGames, AmazonCountry.fr, AmazonBrowserNode.DSFr);

                    if (results != null && results.Any())
                    {
                        objResults = AmazonServices.Parse(results[0].Link, AmazonCountry.fr, !string.IsNullOrWhiteSpace(objEntity.BarCode), AmazonIndex.VideoGames, string.Empty);
                    }

                    if (objResults != null)
                    {
                        objEntity = Fill(objResults, objEntity, ref bFind);
                    }
                }
                #endregion
                #region Amazon DE
                if (bFind == false && MySettings.EnableAmazonDeNds == true)
                {
                    Collection <PartialMatche> results = AmazonServices.Search(strSearch, string.Empty, AmazonIndex.VideoGames, AmazonCountry.de, AmazonBrowserNode.DSDe);

                    if (results != null && results.Any())
                    {
                        objResults = AmazonServices.Parse(results[0].Link, AmazonCountry.de, !string.IsNullOrWhiteSpace(objEntity.BarCode), AmazonIndex.VideoGames, string.Empty);
                    }

                    if (objResults != null)
                    {
                        objEntity = Fill(objResults, objEntity, ref bFind);
                    }
                }
                #endregion
                #region Amazon IT
                if (bFind == false && MySettings.EnableAmazonItNds == true)
                {
                    Collection <PartialMatche> results = AmazonServices.Search(strSearch, string.Empty, AmazonIndex.VideoGames, AmazonCountry.it, AmazonBrowserNode.DSIt);

                    if (results != null && results.Any())
                    {
                        objResults = AmazonServices.Parse(results[0].Link, AmazonCountry.it, !string.IsNullOrWhiteSpace(objEntity.BarCode), AmazonIndex.VideoGames, string.Empty);
                    }

                    if (objResults != null)
                    {
                        Fill(objResults, objEntity, ref bFind);
                    }
                }
                #endregion
                #region Amazon ES
                if (bFind == false && MySettings.EnableAmazonSpNds == true)
                {
                    Collection <PartialMatche> results = AmazonServices.Search(strSearch, string.Empty, AmazonIndex.VideoGames, AmazonCountry.es, AmazonBrowserNode.DSEs);

                    if (results != null && results.Any())
                    {
                        objResults = AmazonServices.Parse(results[0].Link, AmazonCountry.es, !string.IsNullOrWhiteSpace(objEntity.BarCode), AmazonIndex.VideoGames, string.Empty);
                    }

                    if (objResults != null)
                    {
                        Fill(objResults, objEntity, ref bFind);
                    }
                }
                #endregion

                CommonServices.Update(objEntity);
            }
        }
Exemplo n.º 5
0
        public void GetInfoFromWeb(IMyCollectionsData item)
        {
            string search = string.Empty;

            try
            {
                bool      bFind      = false;
                Hashtable objResults = null;

                Movie objEntity = item as Movie;
                if (objEntity == null)
                {
                    return;
                }

                if (objEntity.IsComplete == false)
                {
                    string strSearch = objEntity.Title;
                    search = strSearch;

                    search = Util.CleanExtensions(search);

                    Task.Factory.StartNew(() => Util.NotifyEvent("getInfoFromWeb: Movie : " + search));

                    #region TMDB

                    if (MySettings.EnableTMDBMovies == true)
                    {
                        strSearch = objEntity.Title;

                        if (MySettings.CleanTitle == true)
                        {
                            strSearch = Util.CleanExtensions(strSearch);
                        }

                        if (string.IsNullOrEmpty(objEntity.OriginalTitle) == false)
                        {
                            strSearch = objEntity.OriginalTitle;
                        }

                        Collection <PartialMatche> results = TheMovieDbServices.Search(strSearch, LanguageType.EN);

                        if (results != null && results.Any())
                        {
                            objResults = TheMovieDbServices.Parse(results[0].Link, LanguageType.EN);
                        }

                        if (objResults != null)
                        {
                            bFind = Fill(objResults, objEntity);
                        }
                    }
                    if (bFind == false && MySettings.EnableTMDBFrMovies == true)
                    {
                        strSearch = objEntity.Title;

                        if (MySettings.CleanTitle == true)
                        {
                            strSearch = Util.CleanExtensions(strSearch);
                        }

                        if (string.IsNullOrEmpty(objEntity.OriginalTitle) == false)
                        {
                            strSearch = objEntity.OriginalTitle;
                        }

                        Collection <PartialMatche> results = TheMovieDbServices.Search(strSearch, LanguageType.FR);

                        if (results != null && results.Any())
                        {
                            objResults = TheMovieDbServices.Parse(results[0].Link, LanguageType.FR);
                        }

                        if (objResults != null)
                        {
                            bFind = Fill(objResults, objEntity);
                        }
                    }
                    if (bFind == false && MySettings.EnableTMDBDeMovies == true)
                    {
                        strSearch = objEntity.Title;

                        if (MySettings.CleanTitle == true)
                        {
                            strSearch = Util.CleanExtensions(strSearch);
                        }

                        if (string.IsNullOrEmpty(objEntity.OriginalTitle) == false)
                        {
                            strSearch = objEntity.OriginalTitle;
                        }

                        Collection <PartialMatche> results = TheMovieDbServices.Search(strSearch, LanguageType.DE);

                        if (results != null && results.Any())
                        {
                            objResults = TheMovieDbServices.Parse(results[0].Link, LanguageType.DE);
                        }

                        if (objResults != null)
                        {
                            bFind = Fill(objResults, objEntity);
                        }
                    }
                    if (bFind == false && MySettings.EnableTMDBItMovies == true)
                    {
                        strSearch = objEntity.Title;

                        if (MySettings.CleanTitle == true)
                        {
                            strSearch = Util.CleanExtensions(strSearch);
                        }

                        if (string.IsNullOrEmpty(objEntity.OriginalTitle) == false)
                        {
                            strSearch = objEntity.OriginalTitle;
                        }

                        Collection <PartialMatche> results = TheMovieDbServices.Search(strSearch, LanguageType.IT);

                        if (results != null && results.Any())
                        {
                            objResults = TheMovieDbServices.Parse(results[0].Link, LanguageType.IT);
                        }

                        if (objResults != null)
                        {
                            bFind = Fill(objResults, objEntity);
                        }
                    }
                    if (bFind == false && MySettings.EnableTMDBCnMovies == true)
                    {
                        strSearch = objEntity.Title;

                        if (MySettings.CleanTitle == true)
                        {
                            strSearch = Util.CleanExtensions(strSearch);
                        }

                        if (string.IsNullOrEmpty(objEntity.OriginalTitle) == false)
                        {
                            strSearch = objEntity.OriginalTitle;
                        }

                        Collection <PartialMatche> results = TheMovieDbServices.Search(strSearch, LanguageType.CN);

                        if (results != null && results.Any())
                        {
                            objResults = TheMovieDbServices.Parse(results[0].Link, LanguageType.CN);
                        }

                        if (objResults != null)
                        {
                            bFind = Fill(objResults, objEntity);
                        }
                    }
                    if (bFind == false && MySettings.EnableTMDBSpMovies == true)
                    {
                        strSearch = objEntity.Title;

                        if (MySettings.CleanTitle == true)
                        {
                            strSearch = Util.CleanExtensions(strSearch);
                        }

                        if (string.IsNullOrEmpty(objEntity.OriginalTitle) == false)
                        {
                            strSearch = objEntity.OriginalTitle;
                        }

                        Collection <PartialMatche> results = TheMovieDbServices.Search(strSearch, LanguageType.ES);

                        if (results != null && results.Any())
                        {
                            objResults = TheMovieDbServices.Parse(results[0].Link, LanguageType.ES);
                        }

                        if (objResults != null)
                        {
                            bFind = Fill(objResults, objEntity);
                        }
                    }

                    if (bFind == false && MySettings.EnableTMDBPtMovies == true)
                    {
                        strSearch = objEntity.Title;

                        if (MySettings.CleanTitle == true)
                        {
                            strSearch = Util.CleanExtensions(strSearch);
                        }

                        if (string.IsNullOrEmpty(objEntity.OriginalTitle) == false)
                        {
                            strSearch = objEntity.OriginalTitle;
                        }

                        Collection <PartialMatche> results = TheMovieDbServices.Search(strSearch, LanguageType.PT);

                        if (results != null && results.Any())
                        {
                            objResults = TheMovieDbServices.Parse(results[0].Link, LanguageType.PT);
                        }

                        if (objResults != null)
                        {
                            bFind = Fill(objResults, objEntity);
                        }
                    }

                    #endregion
                    #region Allocine

                    if (bFind == false && MySettings.EnableAlloCineMovies == true)
                    {
                        strSearch = objEntity.Title;

                        if (MySettings.CleanTitle == true)
                        {
                            strSearch = Util.CleanExtensions(strSearch);
                        }

                        if (string.IsNullOrEmpty(objEntity.OriginalTitle) == false)
                        {
                            strSearch = objEntity.OriginalTitle;
                        }

                        Collection <PartialMatche> results = AlloCineServices.Search(strSearch, LanguageType.FR);

                        if (results != null && results.Any())
                        {
                            objResults = AlloCineServices.Parse(results[0].Link, LanguageType.FR);
                        }

                        if (objResults != null)
                        {
                            bFind = Fill(objResults, objEntity);
                        }
                    }

                    if (bFind == false && MySettings.EnableAdoroCinemaMovies == true)
                    {
                        strSearch = objEntity.Title;

                        if (MySettings.CleanTitle == true)
                        {
                            strSearch = Util.CleanExtensions(strSearch);
                        }

                        if (string.IsNullOrEmpty(objEntity.OriginalTitle) == false)
                        {
                            strSearch = objEntity.OriginalTitle;
                        }

                        Collection <PartialMatche> results = AlloCineServices.Search(strSearch, LanguageType.BR);

                        if (results != null && results.Any())
                        {
                            objResults = AlloCineServices.Parse(results[0].Link, LanguageType.BR);
                        }

                        if (objResults != null)
                        {
                            bFind = Fill(objResults, objEntity);
                        }
                    }

                    if (bFind == false && MySettings.EnableFilmStartsMovies == true)
                    {
                        strSearch = objEntity.Title;

                        if (MySettings.CleanTitle == true)
                        {
                            strSearch = Util.CleanExtensions(strSearch);
                        }

                        if (string.IsNullOrEmpty(objEntity.OriginalTitle) == false)
                        {
                            strSearch = objEntity.OriginalTitle;
                        }

                        Collection <PartialMatche> results = AlloCineServices.Search(strSearch, LanguageType.DE);

                        if (results != null && results.Any())
                        {
                            objResults = AlloCineServices.Parse(results[0].Link, LanguageType.DE);
                        }

                        if (objResults != null)
                        {
                            bFind = Fill(objResults, objEntity);
                        }
                    }

                    #endregion
                    #region IMDB

                    if (bFind == false && MySettings.EnableIMDBMovies == true)
                    {
                        strSearch = objEntity.Title;

                        if (MySettings.CleanTitle == true)
                        {
                            strSearch = Util.CleanExtensions(strSearch);
                        }

                        if (string.IsNullOrEmpty(objEntity.OriginalTitle) == false)
                        {
                            strSearch = objEntity.OriginalTitle;
                        }

                        Collection <PartialMatche> results = ImdbServices.Search(strSearch);

                        if (results != null && results.Any())
                        {
                            objResults = ImdbServices.Parse(results[0].Link, true, strSearch);
                        }

                        if (objResults != null)
                        {
                            bFind = Fill(objResults, objEntity);
                        }
                    }

                    #endregion
                    #region Amazon US

                    if (bFind == false && MySettings.EnableAmazonMovie == true)
                    {
                        strSearch = objEntity.Title;

                        if (MySettings.CleanTitle == true)
                        {
                            strSearch = Util.CleanExtensions(strSearch);
                        }

                        if (string.IsNullOrEmpty(objEntity.OriginalTitle) == false)
                        {
                            strSearch = objEntity.OriginalTitle;
                        }

                        Collection <PartialMatche> results = AmazonServices.Search(strSearch, string.Empty, AmazonIndex.DVD,
                                                                                   AmazonCountry.com, AmazonBrowserNode.None);

                        if (results != null && results.Any())
                        {
                            objResults = AmazonServices.Parse(results[0].Link, AmazonCountry.com,
                                                              !string.IsNullOrWhiteSpace(objEntity.BarCode), AmazonIndex.DVD, string.Empty);
                        }

                        if (objResults != null)
                        {
                            bFind = Fill(objResults, objEntity);
                        }
                    }

                    #endregion
                    #region Amazon FR

                    if (bFind == false && MySettings.EnableAmazonFrMovie == true)
                    {
                        strSearch = objEntity.Title;

                        if (MySettings.CleanTitle == true)
                        {
                            strSearch = Util.CleanExtensions(strSearch);
                        }

                        if (string.IsNullOrEmpty(objEntity.OriginalTitle) == false)
                        {
                            strSearch = objEntity.OriginalTitle;
                        }

                        Collection <PartialMatche> results = AmazonServices.Search(strSearch, string.Empty, AmazonIndex.DVD,
                                                                                   AmazonCountry.fr, AmazonBrowserNode.None);

                        if (results != null && results.Any())
                        {
                            objResults = AmazonServices.Parse(results[0].Link, AmazonCountry.fr,
                                                              !string.IsNullOrWhiteSpace(objEntity.BarCode), AmazonIndex.DVD, string.Empty);
                        }

                        if (objResults != null)
                        {
                            bFind = Fill(objResults, objEntity);
                        }
                    }

                    #endregion
                    #region Amazon DE

                    if (bFind == false && MySettings.EnableAmazonDeMovie == true)
                    {
                        strSearch = objEntity.Title;

                        if (MySettings.CleanTitle == true)
                        {
                            strSearch = Util.CleanExtensions(strSearch);
                        }

                        if (string.IsNullOrEmpty(objEntity.OriginalTitle) == false)
                        {
                            strSearch = objEntity.OriginalTitle;
                        }

                        Collection <PartialMatche> results = AmazonServices.Search(strSearch, string.Empty, AmazonIndex.DVD,
                                                                                   AmazonCountry.de, AmazonBrowserNode.None);

                        if (results != null && results.Any())
                        {
                            objResults = AmazonServices.Parse(results[0].Link, AmazonCountry.de,
                                                              !string.IsNullOrWhiteSpace(objEntity.BarCode), AmazonIndex.DVD, string.Empty);
                        }

                        if (objResults != null)
                        {
                            bFind = Fill(objResults, objEntity);
                        }
                    }

                    #endregion
                    #region Amazon IT

                    if (bFind == false && MySettings.EnableAmazonItMovie == true)
                    {
                        strSearch = objEntity.Title;

                        if (MySettings.CleanTitle == true)
                        {
                            strSearch = Util.CleanExtensions(strSearch);
                        }

                        if (string.IsNullOrEmpty(objEntity.OriginalTitle) == false)
                        {
                            strSearch = objEntity.OriginalTitle;
                        }

                        Collection <PartialMatche> results = AmazonServices.Search(strSearch, string.Empty, AmazonIndex.DVD,
                                                                                   AmazonCountry.it, AmazonBrowserNode.None);

                        if (results != null && results.Any())
                        {
                            objResults = AmazonServices.Parse(results[0].Link, AmazonCountry.it,
                                                              !string.IsNullOrWhiteSpace(objEntity.BarCode), AmazonIndex.DVD, string.Empty);
                        }

                        if (objResults != null)
                        {
                            bFind = Fill(objResults, objEntity);
                        }
                    }

                    #endregion
                    #region Amazon CN

                    if (bFind == false && MySettings.EnableAmazonCnMovie == true)
                    {
                        strSearch = objEntity.Title;

                        if (MySettings.CleanTitle == true)
                        {
                            strSearch = Util.CleanExtensions(strSearch);
                        }

                        if (string.IsNullOrEmpty(objEntity.OriginalTitle) == false)
                        {
                            strSearch = objEntity.OriginalTitle;
                        }

                        Collection <PartialMatche> results = AmazonServices.Search(strSearch, string.Empty, AmazonIndex.DVD,
                                                                                   AmazonCountry.cn, AmazonBrowserNode.None);

                        if (results != null && results.Any())
                        {
                            objResults = AmazonServices.Parse(results[0].Link, AmazonCountry.cn,
                                                              !string.IsNullOrWhiteSpace(objEntity.BarCode), AmazonIndex.DVD, string.Empty);
                        }

                        if (objResults != null)
                        {
                            bFind = Fill(objResults, objEntity);
                        }
                    }

                    #endregion
                    #region Amazon ES

                    if (bFind == false && MySettings.EnableAmazonSpMovie == true)
                    {
                        strSearch = objEntity.Title;

                        if (MySettings.CleanTitle == true)
                        {
                            strSearch = Util.CleanExtensions(strSearch);
                        }

                        if (string.IsNullOrEmpty(objEntity.OriginalTitle) == false)
                        {
                            strSearch = objEntity.OriginalTitle;
                        }

                        Collection <PartialMatche> results = AmazonServices.Search(strSearch, string.Empty, AmazonIndex.DVD,
                                                                                   AmazonCountry.es, AmazonBrowserNode.None);

                        if (results != null && results.Any())
                        {
                            objResults = AmazonServices.Parse(results[0].Link, AmazonCountry.es,
                                                              !string.IsNullOrWhiteSpace(objEntity.BarCode), AmazonIndex.DVD, string.Empty);
                        }

                        if (objResults != null)
                        {
                            bFind = Fill(objResults, objEntity);
                        }
                    }

                    #endregion

                    CommonServices.Update(objEntity);
                }
            }
            catch (Exception exception)
            {
                Util.LogException(exception, search);
                throw;
            }
        }
Exemplo n.º 6
0
        public void GetInfoFromWeb(IMyCollectionsData item)
        {
            Books objEntity = item as Books;

            if (objEntity == null)
            {
                return;
            }

            bool bFind = false;

            if (objEntity.IsComplete == false)
            {
                string strSearch = objEntity.Title;
                string artist    = string.Empty;
                if (objEntity.Artists.Any() && string.IsNullOrWhiteSpace(objEntity.Artists.First().FulleName) == false)
                {
                    artist = objEntity.Artists.First().FulleName;
                }

                if (MySettings.CleanTitle == true)
                {
                    strSearch = Util.CleanExtensions(strSearch);
                }

                string search = strSearch;
                Task.Factory.StartNew(() => Util.NotifyEvent("getInfoFromWeb: Book : " + search));

                Hashtable objResults = null;
                if (MySettings.EnableAmazonBook == true)
                {
                    Collection <PartialMatche> results = AmazonServices.Search(strSearch, artist, AmazonIndex.Books, AmazonCountry.com, AmazonBrowserNode.None);

                    if (results != null && results.Any())
                    {
                        objResults = AmazonServices.Parse(results[0].Link, AmazonCountry.com, !string.IsNullOrWhiteSpace(objEntity.BarCode), AmazonIndex.Books, string.Empty);
                    }

                    if (objResults != null)
                    {
                        objEntity = Fill(objResults, objEntity, ref bFind);
                    }
                }

                if (bFind == false && MySettings.EnableAmazonFrBook == true)
                {
                    Collection <PartialMatche> results = AmazonServices.Search(strSearch, artist, AmazonIndex.Books, AmazonCountry.fr, AmazonBrowserNode.None);

                    if (results != null && results.Any())
                    {
                        objResults = AmazonServices.Parse(results[0].Link, AmazonCountry.fr, !string.IsNullOrWhiteSpace(objEntity.BarCode), AmazonIndex.Books, string.Empty);
                    }

                    if (objResults != null)
                    {
                        objEntity = Fill(objResults, objEntity, ref bFind);
                    }
                }
                if (bFind == false && MySettings.EnableAmazonDeBook == true)
                {
                    Collection <PartialMatche> results = AmazonServices.Search(strSearch, artist, AmazonIndex.Books, AmazonCountry.de, AmazonBrowserNode.None);

                    if (results != null && results.Any())
                    {
                        objResults = AmazonServices.Parse(results[0].Link, AmazonCountry.de, !string.IsNullOrWhiteSpace(objEntity.BarCode), AmazonIndex.Books, string.Empty);
                    }

                    if (objResults != null)
                    {
                        objEntity = Fill(objResults, objEntity, ref bFind);
                    }
                }
                if (bFind == false && MySettings.EnableAmazonItBook == true)
                {
                    Collection <PartialMatche> results = AmazonServices.Search(strSearch, artist, AmazonIndex.Books, AmazonCountry.it, AmazonBrowserNode.None);

                    if (results != null && results.Any())
                    {
                        objResults = AmazonServices.Parse(results[0].Link, AmazonCountry.it, !string.IsNullOrWhiteSpace(objEntity.BarCode), AmazonIndex.Books, string.Empty);
                    }

                    if (objResults != null)
                    {
                        objEntity = Fill(objResults, objEntity, ref bFind);
                    }
                }
                if (bFind == false && MySettings.EnableAmazonCnBook == true)
                {
                    Collection <PartialMatche> results = AmazonServices.Search(strSearch, artist, AmazonIndex.Books, AmazonCountry.cn, AmazonBrowserNode.None);

                    if (results != null && results.Any())
                    {
                        objResults = AmazonServices.Parse(results[0].Link, AmazonCountry.cn, !string.IsNullOrWhiteSpace(objEntity.BarCode), AmazonIndex.Books, string.Empty);
                    }

                    if (objResults != null)
                    {
                        objEntity = Fill(objResults, objEntity, ref bFind);
                    }
                }
                if (bFind == false && MySettings.EnableAmazonSpBook == true)
                {
                    Collection <PartialMatche> results = AmazonServices.Search(strSearch, artist, AmazonIndex.Books, AmazonCountry.es, AmazonBrowserNode.None);

                    if (results != null && results.Any())
                    {
                        objResults = AmazonServices.Parse(results[0].Link, AmazonCountry.es, !string.IsNullOrWhiteSpace(objEntity.BarCode), AmazonIndex.Books, string.Empty);
                    }

                    if (objResults != null)
                    {
                        objEntity = Fill(objResults, objEntity, ref bFind);
                    }
                }
                CommonServices.Update(objEntity);
            }
        }
Exemplo n.º 7
0
        public void GetInfoFromWeb(IMyCollectionsData item)
        {
            bool bFind = false;

            XXX objEntity = item as XXX;

            if (objEntity == null)
            {
                return;
            }

            if (objEntity.IsComplete == false)
            {
                string strSearch = objEntity.Title;

                if (MySettings.CleanTitle == true)
                {
                    strSearch = Util.CleanExtensions(strSearch);
                }

                string search = strSearch;
                Task.Factory.StartNew(() => Util.NotifyEvent("getInfoFromWeb: XXX : " + search));

                Hashtable objResults = null;
                #region AdultDvdEmpire
                if (MySettings.EnableAdultDvdEmpire == true)
                {
                    Collection <PartialMatche> results = AdultdvdempireServices.Search(strSearch);

                    if (results != null && results.Any())
                    {
                        objResults = AdultdvdempireServices.Parse(results[0].Link, true, strSearch);
                    }

                    if (objResults != null)
                    {
                        bFind = Fill(objResults, objEntity);
                    }
                }
                #endregion
                #region HotMovies
                if (bFind == false && MySettings.EnableHotMovies == true)
                {
                    Collection <PartialMatche> results = HotMoviesServices.Search(strSearch);

                    if (results != null && results.Any())
                    {
                        objResults = HotMoviesServices.Parse(results[0].Link, true);
                    }

                    if (objResults != null)
                    {
                        bFind = Fill(objResults, objEntity);
                    }
                }
                #endregion
                #region SugarVod
                if (bFind == false && MySettings.EnableSugardVod == true)
                {
                    Collection <PartialMatche> results = SugarVodServices.Search(strSearch);

                    if (results != null && results.Any())
                    {
                        objResults = SugarVodServices.Parse(results[0].Link, true, strSearch);
                    }

                    if (objResults != null)
                    {
                        bFind = Fill(objResults, objEntity);
                    }
                }
                #endregion SugarVod
                #region CdUniverse
                if (bFind == false && MySettings.EnableCdUniverse == true)
                {
                    Collection <PartialMatche> results = CdUniverseServices.Search(strSearch);

                    if (results != null && results.Any())
                    {
                        objResults = CdUniverseServices.Parse(results[0].Link, true, strSearch);
                    }

                    if (objResults != null)
                    {
                        bFind = Fill(objResults, objEntity);
                    }
                }
                #endregion
                #region Orgazmik
                if (bFind == false && MySettings.EnableOrgazmik == true)
                {
                    Collection <PartialMatche> results = OrgazmikServices.Search(strSearch);

                    if (results != null && results.Any())
                    {
                        objResults = OrgazmikServices.Parse(results[0].Link, true, strSearch);
                    }

                    if (objResults != null)
                    {
                        bFind = Fill(objResults, objEntity);
                    }
                }
                #endregion
                #region AdultBluRayHdDvd
                if (bFind == false && MySettings.EnableAdultBluRayHdDvd == true)
                {
                    Collection <PartialMatche> results = AdultBluRayHdDvdServices.Search(strSearch);

                    if (results != null && results.Any())
                    {
                        objResults = AdultBluRayHdDvdServices.Parse(results[0].Link, true);
                    }

                    if (objResults != null)
                    {
                        bFind = Fill(objResults, objEntity);
                    }
                }
                #endregion
                #region DorcelShop
                if (bFind == false && MySettings.EnableDorcelShop == true)
                {
                    Collection <PartialMatche> results = DorcelServices.Search(strSearch);

                    if (results != null && results.Any())
                    {
                        objResults = DorcelServices.Parse(results[0].Link, true, strSearch);
                    }

                    if (objResults != null)
                    {
                        bFind = Fill(objResults, objEntity);
                    }
                }
                #endregion
                #region Amazon FR
                if (bFind == false && MySettings.EnableAmazonFrXXX == true)
                {
                    strSearch = objEntity.Title;

                    if (MySettings.CleanTitle == true)
                    {
                        strSearch = Util.CleanExtensions(strSearch);
                    }

                    Collection <PartialMatche> results = AmazonServices.Search(strSearch, string.Empty, AmazonIndex.DVD, AmazonCountry.fr, AmazonBrowserNode.None);

                    if (results != null && results.Any())
                    {
                        objResults = AmazonServices.Parse(results[0].Link, AmazonCountry.fr, !string.IsNullOrWhiteSpace(objEntity.BarCode), AmazonIndex.DVD, string.Empty);
                    }

                    if (objResults != null)
                    {
                        bFind = Fill(objResults, objEntity);
                    }
                }
                #endregion
                #region TMDB
                if (bFind == false && MySettings.EnableTMDBXXX == true)
                {
                    Collection <PartialMatche> results = TheMovieDbServices.Search(strSearch, LanguageType.EN);

                    if (results != null && results.Any())
                    {
                        objResults = TheMovieDbServices.Parse(results[0].Link, LanguageType.EN);
                    }

                    if (objResults != null)
                    {
                        bFind = Fill(objResults, objEntity);
                    }
                }
                #endregion

                CommonServices.Update(objEntity);
            }
        }
Exemplo n.º 8
0
        public void GetInfoFromWeb(IMyCollectionsData item)
        {
            Music objEntity = item as Music;

            if (objEntity == null)
            {
                return;
            }

            bool      bFind      = false;
            Hashtable objResults = null;

            if (objEntity.IsComplete == false)
            {
                string strSearch = objEntity.Title.Trim();
                string artist    = string.Empty;
                if (objEntity.Artists.Any() && string.IsNullOrWhiteSpace(objEntity.Artists.First().FulleName) == false)
                {
                    artist = objEntity.Artists.First().FulleName;
                }


                if (MySettings.CleanTitle == true)
                {
                    strSearch = Util.CleanExtensions(strSearch);
                }

                string search = strSearch;
                Task.Factory.StartNew(() => Util.NotifyEvent("getInfoFromWeb: Music : " + search));

                if (bFind == false && MySettings.EnableNokiaMusicUs == true &&
                    string.IsNullOrWhiteSpace(strSearch) == false)
                {
                    Collection <PartialMatche> results = NokiaServices.Search(strSearch);

                    if (results != null && results.Any())
                    {
                        objResults = NokiaServices.Parse(results[0].Link);
                    }

                    if (objResults != null)
                    {
                        bFind = Fill(objResults, objEntity);
                    }
                }
                if (bFind == false && MySettings.EnableMusicBrainzUs == true && string.IsNullOrWhiteSpace(strSearch) == false)
                {
                    Collection <PartialMatche> results = MusicbrainzServices.Search(strSearch, artist);

                    if (results != null && results.Any())
                    {
                        objResults = MusicbrainzServices.Parse(results[0].Link);
                    }

                    if (objResults != null)
                    {
                        bFind = Fill(objResults, objEntity);
                    }
                }
                if (bFind == false && MySettings.EnableAmazonMusic == true)
                {
                    Collection <PartialMatche> results = AmazonServices.Search(strSearch, artist, AmazonIndex.Music,
                                                                               AmazonCountry.com, AmazonBrowserNode.None);

                    if (results != null && results.Any())
                    {
                        objResults = AmazonServices.Parse(results[0].Link, AmazonCountry.com,
                                                          !string.IsNullOrWhiteSpace(objEntity.BarCode),
                                                          AmazonIndex.Music, string.Empty);
                    }

                    if (objResults != null)
                    {
                        bFind = Fill(objResults, objEntity);
                    }
                }

                if (bFind == false && MySettings.EnableGraceNoteUs == true)
                {
                    Collection <PartialMatche> results = GraceNoteServices.Search(strSearch, GraceNoteLanguage.eng,
                                                                                  artist);

                    if (results != null && results.Any())
                    {
                        objResults = GraceNoteServices.Parse(results[0].Link, GraceNoteLanguage.eng);
                    }

                    if (objResults != null)
                    {
                        bFind = Fill(objResults, objEntity);
                    }
                }

                if (bFind == false && MySettings.EnableAmazonFrMusic == true)
                {
                    Collection <PartialMatche> results = AmazonServices.Search(strSearch, artist, AmazonIndex.Music,
                                                                               AmazonCountry.fr, AmazonBrowserNode.None);

                    if (results != null && results.Any())
                    {
                        objResults = AmazonServices.Parse(results[0].Link, AmazonCountry.fr,
                                                          !string.IsNullOrWhiteSpace(objEntity.BarCode),
                                                          AmazonIndex.Music, string.Empty);
                    }

                    if (objResults != null)
                    {
                        bFind = Fill(objResults, objEntity);
                    }
                }

                if (bFind == false && MySettings.EnableAmazonDeMusic == true)
                {
                    Collection <PartialMatche> results = AmazonServices.Search(strSearch, artist, AmazonIndex.Music,
                                                                               AmazonCountry.de, AmazonBrowserNode.None);

                    if (results != null && results.Any())
                    {
                        objResults = AmazonServices.Parse(results[0].Link, AmazonCountry.de,
                                                          !string.IsNullOrWhiteSpace(objEntity.BarCode),
                                                          AmazonIndex.Music, string.Empty);
                    }

                    if (objResults != null)
                    {
                        bFind = Fill(objResults, objEntity);
                    }
                }

                if (bFind == false && MySettings.EnableAmazonItMusic == true)
                {
                    Collection <PartialMatche> results = AmazonServices.Search(strSearch, artist, AmazonIndex.Music,
                                                                               AmazonCountry.it, AmazonBrowserNode.None);

                    if (results != null && results.Any())
                    {
                        objResults = AmazonServices.Parse(results[0].Link, AmazonCountry.it,
                                                          !string.IsNullOrWhiteSpace(objEntity.BarCode),
                                                          AmazonIndex.Music, string.Empty);
                    }

                    if (objResults != null)
                    {
                        bFind = Fill(objResults, objEntity);
                    }
                }

                if (bFind == false && MySettings.EnableAmazonCnMusic == true)
                {
                    Collection <PartialMatche> results = AmazonServices.Search(strSearch, artist, AmazonIndex.Music,
                                                                               AmazonCountry.cn, AmazonBrowserNode.None);

                    if (results != null && results.Any())
                    {
                        objResults = AmazonServices.Parse(results[0].Link, AmazonCountry.cn,
                                                          !string.IsNullOrWhiteSpace(objEntity.BarCode),
                                                          AmazonIndex.Music, string.Empty);
                    }

                    if (objResults != null)
                    {
                        bFind = Fill(objResults, objEntity);
                    }
                }

                if (bFind == false && MySettings.EnableAmazonSpMusic == true)
                {
                    Collection <PartialMatche> results = AmazonServices.Search(strSearch, artist, AmazonIndex.Music,
                                                                               AmazonCountry.es, AmazonBrowserNode.None);

                    if (results != null && results.Any())
                    {
                        objResults = AmazonServices.Parse(results[0].Link, AmazonCountry.es,
                                                          !string.IsNullOrWhiteSpace(objEntity.BarCode),
                                                          AmazonIndex.Music, string.Empty);
                    }

                    if (objResults != null)
                    {
                        bFind = Fill(objResults, objEntity);
                    }
                }

                if (bFind == false && MySettings.EnableLastFM == true &&
                    string.IsNullOrWhiteSpace(strSearch) == false)
                {
                    Collection <PartialMatche> results = LastFmServices.Search(strSearch);

                    if (results != null && results.Any())
                    {
                        objResults = LastFmServices.Parse(results[0].Link, results[0].Title, results[0].Artist);
                    }

                    if (objResults != null)
                    {
                        bFind = Fill(objResults, objEntity);
                    }
                }

                if (bFind == false && MySettings.EnableFnacMusic == true &&
                    string.IsNullOrWhiteSpace(strSearch) == false)
                {
                    Collection <PartialMatche> results = FnacServices.Search(strSearch, artist);

                    if (results != null && results.Any())
                    {
                        objResults = FnacServices.Parse(results[0].Link, true, strSearch);
                    }

                    if (objResults != null)
                    {
                        bFind = Fill(objResults, objEntity);
                    }
                }

                if (objEntity.Runtime == null || objEntity.BitRate == null)
                {
                    if (File.Exists(objEntity.FilePath + @"\" + objEntity.FileName))
                    {
                        Mp3Header objMp3Header = new Mp3Header();
                        if (objMp3Header.ReadMP3Information(objEntity.FilePath + @"\" + objEntity.FileName))
                        {
                            if (objEntity.Runtime == null)
                            {
                                objEntity.Runtime = objMp3Header.intLength;
                            }
                            if (objEntity.BitRate == null)
                            {
                                objEntity.BitRate = objMp3Header.intBitRate;
                            }
                        }
                    }
                }

                CommonServices.Update(objEntity);
            }
        }
Exemplo n.º 9
0
        public void GetInfoFromWeb(IMyCollectionsData item)
        {
            SeriesSeason objEntity = item as SeriesSeason;

            if (objEntity == null)
            {
                return;
            }

            bool bFind = false;

            string strSearch = objEntity.Title;

            if (string.IsNullOrWhiteSpace(strSearch))
            {
                return;
            }

            if (MySettings.CleanTitle == true)
            {
                strSearch = Util.CleanExtensions(strSearch);
            }

            string search = strSearch;

            Task.Factory.StartNew(() => Util.NotifyEvent("getInfoFromWeb: Serie : " + search));

            #region TVDB

            Hashtable objResults = null;
            if (MySettings.EnableTVDBSeries == true)
            {
                Collection <PartialMatche> results = TvdbServices.Search(strSearch, LanguageType.EN);

                if (results != null && results.Any())
                {
                    objResults = TvdbServices.Parse(results[0].Link, LanguageType.EN);
                }

                if (objResults != null)
                {
                    bFind = Fill(objResults, objEntity);
                }
            }

            if (bFind == false && MySettings.EnableTVDBFrSeries == true)
            {
                Collection <PartialMatche> results = TvdbServices.Search(strSearch, LanguageType.FR);

                if (results != null && results.Any())
                {
                    objResults = TvdbServices.Parse(results[0].Link, LanguageType.FR);
                }

                if (objResults != null)
                {
                    bFind = Fill(objResults, objEntity);
                }
            }

            if (bFind == false && MySettings.EnableTVDBDeSeries == true)
            {
                Collection <PartialMatche> results = TvdbServices.Search(strSearch, LanguageType.DE);

                if (results != null && results.Any())
                {
                    objResults = TvdbServices.Parse(results[0].Link, LanguageType.DE);
                }

                if (objResults != null)
                {
                    bFind = Fill(objResults, objEntity);
                }
            }
            if (bFind == false && MySettings.EnableTVDBItSeries == true)
            {
                Collection <PartialMatche> results = TvdbServices.Search(strSearch, LanguageType.IT);

                if (results != null && results.Any())
                {
                    objResults = TvdbServices.Parse(results[0].Link, LanguageType.IT);
                }

                if (objResults != null)
                {
                    bFind = Fill(objResults, objEntity);
                }
            }
            if (bFind == false && MySettings.EnableTVDBCnSeries == true)
            {
                Collection <PartialMatche> results = TvdbServices.Search(strSearch, LanguageType.CN);

                if (results != null && results.Any())
                {
                    objResults = TvdbServices.Parse(results[0].Link, LanguageType.CN);
                }

                if (objResults != null)
                {
                    bFind = Fill(objResults, objEntity);
                }
            }
            if (bFind == false && MySettings.EnableTVDBSpSeries == true)
            {
                Collection <PartialMatche> results = TvdbServices.Search(strSearch, LanguageType.ES);

                if (results != null && results.Any())
                {
                    objResults = TvdbServices.Parse(results[0].Link, LanguageType.ES);
                }

                if (objResults != null)
                {
                    bFind = Fill(objResults, objEntity);
                }
            }
            if (bFind == false && MySettings.EnableTVDBPtSeries == true)
            {
                Collection <PartialMatche> results = TvdbServices.Search(strSearch, LanguageType.PT);

                if (results != null && results.Any())
                {
                    objResults = TvdbServices.Parse(results[0].Link, LanguageType.PT);
                }

                if (objResults != null)
                {
                    bFind = Fill(objResults, objEntity);
                }
            }
            #endregion
            if (bFind == false && MySettings.EnableAlloCineSeries == true)
            {
                Collection <PartialMatche> results = AlloCineServices.SearchSeries(strSearch, LanguageType.FR);

                if (results != null && results.Any())
                {
                    objResults = AlloCineServices.ParseSeries(results[0].Link, objEntity.Season.ToString(CultureInfo.InvariantCulture), LanguageType.FR);
                }

                if (objResults != null)
                {
                    bFind = Fill(objResults, objEntity);
                }
            }

            if (bFind == false && MySettings.EnableIMDBSeries == true)
            {
                Collection <PartialMatche> results = ImdbServices.SearchSeries2(strSearch);

                if (results != null && results.Any())
                {
                    objResults = ImdbServices.Parse(results[0].Link, true, strSearch);
                }

                if (objResults != null)
                {
                    bFind = Fill(objResults, objEntity);
                }
            }

            if (bFind == false && MySettings.EnableAmazonSeries == true)
            {
                Collection <PartialMatche> results = AmazonServices.Search(strSearch, string.Empty, AmazonIndex.DVD, AmazonCountry.com, AmazonBrowserNode.None);

                if (results != null && results.Any())
                {
                    objResults = AmazonServices.Parse(results[0].Link, AmazonCountry.com, !string.IsNullOrWhiteSpace(objEntity.BarCode), AmazonIndex.DVD, string.Empty);
                }

                if (objResults != null)
                {
                    bFind = Fill(objResults, objEntity);
                }
            }

            if (bFind == false && MySettings.EnableAmazonFrSeries == true)
            {
                Collection <PartialMatche> results = AmazonServices.Search(strSearch, string.Empty, AmazonIndex.DVD, AmazonCountry.fr, AmazonBrowserNode.None);

                if (results != null && results.Any())
                {
                    objResults = AmazonServices.Parse(results[0].Link, AmazonCountry.fr, !string.IsNullOrWhiteSpace(objEntity.BarCode), AmazonIndex.DVD, string.Empty);
                }

                if (objResults != null)
                {
                    bFind = Fill(objResults, objEntity);
                }
            }
            if (bFind == false && MySettings.EnableAmazonDeSeries == true)
            {
                Collection <PartialMatche> results = AmazonServices.Search(strSearch, string.Empty, AmazonIndex.DVD, AmazonCountry.de, AmazonBrowserNode.None);

                if (results != null && results.Any())
                {
                    objResults = AmazonServices.Parse(results[0].Link, AmazonCountry.de, !string.IsNullOrWhiteSpace(objEntity.BarCode), AmazonIndex.DVD, string.Empty);
                }

                if (objResults != null)
                {
                    bFind = Fill(objResults, objEntity);
                }
            }
            if (bFind == false && MySettings.EnableAmazonItSeries == true)
            {
                Collection <PartialMatche> results = AmazonServices.Search(strSearch, string.Empty, AmazonIndex.DVD, AmazonCountry.it, AmazonBrowserNode.None);

                if (results != null && results.Any())
                {
                    objResults = AmazonServices.Parse(results[0].Link, AmazonCountry.it, !string.IsNullOrWhiteSpace(objEntity.BarCode), AmazonIndex.DVD, string.Empty);
                }

                if (objResults != null)
                {
                    bFind = Fill(objResults, objEntity);
                }
            }
            if (bFind == false && MySettings.EnableAmazonCnSeries == true)
            {
                Collection <PartialMatche> results = AmazonServices.Search(strSearch, string.Empty, AmazonIndex.DVD, AmazonCountry.cn, AmazonBrowserNode.None);

                if (results != null && results.Any())
                {
                    objResults = AmazonServices.Parse(results[0].Link, AmazonCountry.cn, !string.IsNullOrWhiteSpace(objEntity.BarCode), AmazonIndex.DVD, string.Empty);
                }

                if (objResults != null)
                {
                    bFind = Fill(objResults, objEntity);
                }
            }
            if (bFind == false && MySettings.EnableAmazonSpSeries == true)
            {
                Collection <PartialMatche> results = AmazonServices.Search(strSearch, string.Empty, AmazonIndex.DVD, AmazonCountry.es, AmazonBrowserNode.None);

                if (results != null && results.Any())
                {
                    objResults = AmazonServices.Parse(results[0].Link, AmazonCountry.es, !string.IsNullOrWhiteSpace(objEntity.BarCode), AmazonIndex.DVD, string.Empty);
                }

                if (objResults != null)
                {
                    bFind = Fill(objResults, objEntity);
                }
            }

            CommonServices.Update(objEntity);
        }