Esempio n. 1
0
    //--------------------------------------------------------------------------------------------
    //   Change Menu (and process corresponding actions)
    //--------------------------------------------------------------------------------------------
    private void Change_Menu(string choiceView)
    {
      if (downloadingWorker.IsBusy) downloadingWorker.CancelAsync(); // cancel person image download, if user does select any (other) action

      var ds = new AntMovieCatalog();
      // int ItemID = (int)MyFilms.r[MyFilms.conf.StrIndex]["Number"];
      // May wish to completely re-load the dataset before updating any fields if used in multi-user system, but would req concurrency locks etc so...

      var dlgYesNo = (GUIDialogYesNo)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_YES_NO);
      var dlgmenu = (GUIDialogMenu)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_MENU);
      var choiceViewMenu = new List<string>();

      var keyboard = (VirtualKeyboard)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_VIRTUAL_KEYBOARD);
      if (null == keyboard) return;
      keyboard.Reset();
      keyboard.SetLabelAsInitialText(false); // set to false, otherwise our intial text is cleared

      string title = string.Empty; // variable for searchtitle creation
      string mediapath = string.Empty; // variable for searchpath creation (for nfo/xml/xbmc reader)
      Searchtitles sTitles; // variable to get all searchtitles 
      var movie = new MFMovie(); // movie object for rating and trakt calls

      switch (choiceView)
      {
        case "mainmenu":

          #region show root menu
          if (dlgmenu == null) return;
          dlgmenu.Reset();
          dlgmenu.SetHeading(GUILocalizeStrings.Get(10798701)); // Options ...

          dlgmenu.Add(GUILocalizeStrings.Get(10798704)); //trailer menu "Trailer ..."
          choiceViewMenu.Add("trailermenu");

          if (MyFilms.conf.GlobalUnwatchedOnlyValue != null && MyFilms.conf.StrWatchedField.Length > 0)
          {
            if (MyFilms.conf.EnhancedWatchedStatusHandling)
            {
              int watchedCount = new MultiUserData(MyFilms.r[MyFilms.conf.StrIndex][BaseMesFilms.MultiUserStateField].ToString()).GetUserState(MyFilms.conf.StrUserProfileName).WatchedCount;
              dlgmenu.Add(watchedCount > 0 ? GUILocalizeStrings.Get(1079895) : GUILocalizeStrings.Get(1079894));
            }
            else
            {
              dlgmenu.Add(MyFilms.r[MyFilms.conf.StrIndex][MyFilms.conf.StrWatchedField].ToString().ToLower() != MyFilms.conf.GlobalUnwatchedOnlyValue.ToLower() ? GUILocalizeStrings.Get(1079895) : GUILocalizeStrings.Get(1079894));
            }
            choiceViewMenu.Add("togglewatchedstatus");
          }

          dlgmenu.Add(GUILocalizeStrings.Get(931)); //rating
          choiceViewMenu.Add("rating");

          if (MyFilms.conf.StrFileType == MyFilmsPlugin.MyFilmsGUI.Configuration.CatalogType.AntMovieCatalog4Xtended || MyFilms.conf.EnhancedWatchedStatusHandling) // user rating only for AMC4+ or when using enhanced watched handling
          {
            dlgmenu.Add(GUILocalizeStrings.Get(10798944)); // User Rating
            choiceViewMenu.Add("userrating");
          }

          if (MyFilms.conf.StrSuppressAutomatic || MyFilms.conf.StrSuppressManual)
          {
            dlgmenu.Add(GUILocalizeStrings.Get(1079830)); // Delete movie ...
            choiceViewMenu.Add("delete");
          }

          dlgmenu.Add(GUILocalizeStrings.Get(1079879)); //Search Infos to related persons (load persons in facadeview)
          choiceViewMenu.Add("moviepersonlist");

          dlgmenu.Add(GUILocalizeStrings.Get(10798702)); // Updates ...
          choiceViewMenu.Add("updatesmenu");

          // Add Submenu for useritemx mapping
          dlgmenu.Add(string.Format(GUILocalizeStrings.Get(10798771)));  // Global Mappings ...
          choiceViewMenu.Add("globalmappings");

          if (File.Exists(GUIGraphicsContext.Skin + @"\MyFilmsCoverManager.xml"))
          {
            dlgmenu.Add(GUILocalizeStrings.Get(10798763)); // Cover Manager ...
            choiceViewMenu.Add("covermanager");
          }

          dlgmenu.Add(GUILocalizeStrings.Get(10798767)); // Fanart Manager ...
          choiceViewMenu.Add("fanartmanager");

          //dlgmenu.Add(GUILocalizeStrings.Get(10798703)); // Fanart & Cover ...
          //choiceViewMenu.Add("fanartcovermenu");

          if (Helper.IsTraktAvailableAndEnabled) //  && MyFilms.conf.AllowTraktSync
          {
            dlgmenu.Add(GUILocalizeStrings.Get(10798775)); // Trakt external menu...
            choiceViewMenu.Add("traktinternal");

            if (Helper.IsTraktAvailableAndEnabledAndNewVersion)
            {
              if (ExtendedStartmode(PluginMode.Extended, "Detail context menu - old MF Trakt menu"))
              {
                dlgmenu.Add(GUILocalizeStrings.Get(10798775) + " (MF old menu)"); // Trakt ... (MF menu)
                choiceViewMenu.Add("trakt");
              }
            }
          }
          else LogMyFilms.Debug("trakt not found or wrong version - disabling context entry");

          if (Helper.IsSubCentralAvailableAndEnabled)
          {
            dlgmenu.Add(GUILocalizeStrings.Get(10798707)); // Subtitles ...
            choiceViewMenu.Add("subtitles");
          }
          else LogMyFilms.Debug("Subcentral not found or wrong version - disabling context entry");

          dlgmenu.DoModal(GetID);
          if (dlgmenu.SelectedLabel == -1)
          {
            // GUIControl.FocusControl(GetID, (int)Controls.CTRL_BtnPlay); // Added to return to main view after menu // Removed as it's causing an exception
            // return;
            break;
          }
          Change_Menu(choiceViewMenu[dlgmenu.SelectedLabel].ToLower());
          #endregion
          break;

        case "trailermenu":
          #region trailer menu
          if (dlgmenu == null) return;
          dlgmenu.Reset();
          choiceViewMenu.Clear();

          #region  local trailer ...
          dlgmenu.SetHeading(GUILocalizeStrings.Get(10798704));

          if (Helper.FieldIsSet(MyFilms.conf.StrStorageTrailer)) // StrDirStorTrailer only required for extended search
          {
            string trailercount = "";
            if (string.IsNullOrEmpty(MyFilms.r[MyFilms.conf.StrIndex][MyFilms.conf.StrStorageTrailer].ToString().Trim()))
              trailercount = "0";
            else
            {
              string[] split1 = MyFilms.r[MyFilms.conf.StrIndex][MyFilms.conf.StrStorageTrailer].ToString().Trim().Split(new Char[] { ';' });
              trailercount = split1.Length.ToString();
            }
            if (trailercount != "0")
            {
              dlgmenu.Add(GUILocalizeStrings.Get(10798710) + " (" + trailercount + ")"); //play trailer (<number trailers present>)
              choiceViewMenu.Add("playtrailer");
            }
          }
          #endregion

          dlgmenu.Add(GUILocalizeStrings.Get(10798711)); //search youtube trailer with onlinevideos
          choiceViewMenu.Add("playtraileronlinevideos");

          dlgmenu.Add(GUILocalizeStrings.Get(10798712)); //search apple itunes trailer with onlinevideos
          choiceViewMenu.Add("playtraileronlinevideosappleitunes");

          dlgmenu.Add(GUILocalizeStrings.Get(10798716)); //search IMDB trailer with onlinevideos
          choiceViewMenu.Add("playtraileronlinevideosimdbtrailer");

          dlgmenu.Add("FilmStarts.de (OnlineVideos)");
          choiceViewMenu.Add("playtraileronlinevideosfilmstarts");

          dlgmenu.Add("OnlineVideos ...");
          choiceViewMenu.Add("playtraileronlinevideosall");

          if (Helper.FieldIsSet(MyFilms.conf.StrStorageTrailer)) // StrDirStorTrailer only required for extended search
          {
            dlgmenu.Add(GUILocalizeStrings.Get(10798723)); //Search local Trailer and Update DB (local)
            choiceViewMenu.Add("trailer-register");

            dlgmenu.Add(GUILocalizeStrings.Get(10798725)); //delete Trailer entries from DB record
            choiceViewMenu.Add("trailer-delete");

            dlgmenu.Add(GUILocalizeStrings.Get(10798724)); //load IMDB Trailer, store locally and update DB
            // dlgmenu.Add(GUILocalizeStrings.Get(10798990)); // Load single trailer (TMDB)
            choiceViewMenu.Add("trailer-tmdb");
          }

          dlgmenu.DoModal(GetID);
          if (dlgmenu.SelectedLabel == -1)
          {
            Change_Menu("mainmenu");
            return;
          }
          Change_Menu(choiceViewMenu[dlgmenu.SelectedLabel].ToLower());
          #endregion
          break;

        case "playtraileronlinevideos":
          LaunchOnlineVideos("YouTube");
          break;
        case "playtraileronlinevideosappleitunes":
          LaunchOnlineVideos("iTunes Movie Trailers");
          break;
        case "playtraileronlinevideosimdbtrailer":
          LaunchOnlineVideos("IMDb Movie Trailers");
          break;
        case "playtraileronlinevideosfilmstarts":
          LaunchOnlineVideos("FilmStarts.de Trailer");
          break;

        case "playtraileronlinevideosall":
          #region show all OnlineVideos sites
          if (dlgmenu == null) return;
          dlgmenu.Reset();
          choiceViewMenu.Clear();

          dlgmenu.SetHeading("OnlineVideos ...");

          try
          {
            LoadOnlineVideosViews();
            foreach (string theOnlineVideosView in theOnlineVideosViews)
            {
              dlgmenu.Add(theOnlineVideosView);
              choiceViewMenu.Add(theOnlineVideosView);
            }
          }
          catch (Exception ex)
          {
            LogMyFilms.Warn("Error when trying to load OnlineVideos site list - Exceptoion: " + ex.Message);
          }
          dlgmenu.DoModal(GetID);
          if (dlgmenu.SelectedLabel == -1)
          {
            Change_Menu("mainmenu");
            return;
          }
          LaunchOnlineVideos(choiceViewMenu[dlgmenu.SelectedLabel]);
          #endregion
          break;

        case "playtrailer":
          #region play trailer
          // first check, if trailer files are available, offer options
          //if (Helper.FieldIsSet(MyFilms.conf.StrStorageTrailer)) // StrDirStorTrailer only required for extended search
          if (!string.IsNullOrEmpty(MyFilms.r[MyFilms.conf.StrIndex][MyFilms.conf.StrStorageTrailer].ToString().Trim()))
          {
            trailerPlayed = true;
            Launch_Movie_Trailer(MyFilms.conf.StrIndex, GetID, m_SearchAnimation);
          }
          else
          {
            // Can add autosearch&register logic here before try starting trailers
            if (GUIUtils.ShowYesNoDialog(GUILocalizeStrings.Get(10798704), MyFilms.r[MyFilms.conf.StrIndex][MyFilms.conf.StrSTitle] + "\n" + GUILocalizeStrings.Get(10798737) + "\n" + GUILocalizeStrings.Get(10798739))) //trailer ////no video found locally // Search local trailers  and update DB ?
            {
              SetProcessAnimationStatus(true, m_SearchAnimation);
              //LogMyFilms.Debug("SearchTrailerLocal() SelectedItemInfo from (MyFilms.r[MyFilms.conf.StrIndex][MyFilms.conf.StrTitle1].ToString(): '" + (MyFilms.r[MyFilms.conf.StrIndex][MyFilms.conf.StrTitle1].ToString() + "'"));
              LogMyFilms.Debug("(Auto search trailer after selecting PLAY) title: '" + (MyFilms.r[MyFilms.conf.StrIndex] + "'"));
              SearchTrailerLocal(MyFilms.r, MyFilms.conf.StrIndex, true, true);
              afficher_detail(true);
              SetProcessAnimationStatus(false, m_SearchAnimation);
              trailerPlayed = true;
              Launch_Movie_Trailer(MyFilms.conf.StrIndex, GetID, m_SearchAnimation);
            }
          }
          #endregion
          break;

        case "togglewatchedstatus":
          #region toggle watched status
          if (MyFilms.conf.EnhancedWatchedStatusHandling)
          {
            int watchedCount = new MultiUserData(MyFilms.r[MyFilms.conf.StrIndex][BaseMesFilms.MultiUserStateField].ToString()).GetUserState(MyFilms.conf.StrUserProfileName).WatchedCount;
            Watched_Toggle(MyFilms.r[MyFilms.conf.StrIndex], watchedCount <= 0);
          }
          else
          {
            Watched_Toggle(MyFilms.r[MyFilms.conf.StrIndex], MyFilms.r[MyFilms.conf.StrIndex][MyFilms.conf.StrWatchedField].ToString().ToLower() == MyFilms.conf.GlobalUnwatchedOnlyValue.ToLower());
          }
          afficher_detail(true);
          #endregion
          break;

        case "rating":
          {
            #region DB rating
            MyFilmsDialogSetRating dlgRating = (MyFilmsDialogSetRating)GUIWindowManager.GetWindow(MyFilms.ID_MyFilmsDialogRating);
            if (MyFilms.r[MyFilms.conf.StrIndex]["Rating"].ToString().Length > 0)
            {
              dlgRating.Rating = (decimal)MyFilms.r[MyFilms.conf.StrIndex]["Rating"];
              if (dlgRating.Rating > 10) dlgRating.Rating = 10;
            }
            else dlgRating.Rating = 0;

            dlgRating.SetTitle(MyFilms.r[MyFilms.conf.StrIndex][MyFilms.conf.StrTitle1].ToString());
            dlgRating.DoModal(GetID);
            // if (dlgRating.SelectedLabel == -1 || dlgmenu.SelectedLabel != 2)  // If "ESC" or not returning from "ok"
            if (dlgRating.Result == MyFilmsDialogSetRating.ResultCode.Cancel) // If "ESC" or not returning from "ok"
            {
              Change_Menu("mainmenu");
              return;
            }
            MyFilms.r[MyFilms.conf.StrIndex]["Rating"] = dlgRating.Rating;

            Update_XML_database();
            afficher_detail(true);

            //// tell any listeners that user rated the movie
            //movie = GetMovieFromRecord(MyFilms.r[MyFilms.conf.StrIndex]);
            //string value = dlgRating.Rating.ToString();
            //if (RateItem != null) RateItem(movie, value);
            #endregion
          }
          break;

        case "userrating":
          {
            #region User rating
            var dlgRating = (MyFilmsDialogSetRating)GUIWindowManager.GetWindow(MyFilms.ID_MyFilmsDialogRating);
            if (MyFilms.conf.EnhancedWatchedStatusHandling)
            {
              decimal wRating = new MultiUserData(MyFilms.r[MyFilms.conf.StrIndex][BaseMesFilms.MultiUserStateField].ToString()).GetUserState(MyFilms.conf.StrUserProfileName).UserRating;
              dlgRating.Rating = (wRating != decimal.MinValue) ? wRating : 5;
            }
            else
            {
              if (MyFilms.r[MyFilms.conf.StrIndex]["RatingUser"].ToString().Length > 0)
              {
                dlgRating.Rating = (decimal)MyFilms.r[MyFilms.conf.StrIndex]["RatingUser"];
              }
              else dlgRating.Rating = 5;
            }
            if (dlgRating.Rating > 10) dlgRating.Rating = 10;
            if (dlgRating.Rating < 0) dlgRating.Rating = 5;

            dlgRating.SetTitle(MyFilms.r[MyFilms.conf.StrIndex][MyFilms.conf.StrTitle1].ToString());
            dlgRating.DoModal(GetID);
            // if (dlgRating.SelectedLabel == -1 || dlgmenu.SelectedLabel != 2)  // If "ESC" or not returning from "ok"
            if (dlgRating.Result == MyFilmsDialogSetRating.ResultCode.Cancel) // If "ESC" or not returning from "ok"
            {
              Change_Menu("mainmenu");
              return;
            }
            if (MyFilms.conf.EnhancedWatchedStatusHandling)
            {
              var userData = new MultiUserData(MyFilms.r[MyFilms.conf.StrIndex][BaseMesFilms.MultiUserStateField].ToString());
              userData.SetRating(MyFilms.conf.StrUserProfileName, dlgRating.Rating);
              MyFilms.r[MyFilms.conf.StrIndex][BaseMesFilms.MultiUserStateField] = userData.ResultValueString();
              SyncMusToExtendedFields(MyFilms.r[MyFilms.conf.StrIndex], userData, MyFilms.conf.StrUserProfileName);
            }
            else
            {
              MyFilms.r[MyFilms.conf.StrIndex]["RatingUser"] = dlgRating.Rating; // always set db value, so in enhanced wat hed mode it represents the lst chaned value ...
            }

            if (MyFilms.conf.StrUserProfileName.Length > 0)
            {
              if (dlgRating.Rating > MultiUserData.FavoriteRating)
                MyFilms.r[MyFilms.conf.StrIndex]["Favorite"] = MultiUserData.Add(MyFilms.r[MyFilms.conf.StrIndex]["Favorite"].ToString(), MyFilms.conf.StrUserProfileName);
              else
                MyFilms.r[MyFilms.conf.StrIndex]["Favorite"] = MultiUserData.Remove(MyFilms.r[MyFilms.conf.StrIndex]["Favorite"].ToString(), MyFilms.conf.StrUserProfileName);
            }

            Update_XML_database();
            afficher_detail(true);

            // tell any listeners that user rated the movie
            movie = GetMovieFromRecord(MyFilms.r[MyFilms.conf.StrIndex]);
            string value = dlgRating.Rating.ToString();
            if (RateItem != null) RateItem(movie, value);
            #endregion
          }
          break;

        case "updatesmenu":
          #region updates menu
          if (dlgmenu == null) return;
          dlgmenu.Reset();
          choiceViewMenu.Clear();
          dlgmenu.SetHeading(GUILocalizeStrings.Get(10798702)); // Updates ...

          if (MyFilms.conf.StrFileType == MyFilmsPlugin.MyFilmsGUI.Configuration.CatalogType.AntMovieCatalog3 ||
              MyFilms.conf.StrFileType == MyFilmsPlugin.MyFilmsGUI.Configuration.CatalogType.AntMovieCatalog4Xtended)
          {
            dlgmenu.Add(GUILocalizeStrings.Get(5910)); //Update Internet Movie Details
            choiceViewMenu.Add("grabber");
          }

          dlgmenu.Add(GUILocalizeStrings.Get(10798642)); // Update by Property (choosen within the UPdate List Property
          choiceViewMenu.Add("updproperty");

          if (ExtendedStartmode(MyFilmsDetail.PluginMode.Test, "Details context: remove all details"))
          {
            dlgmenu.Add(GUILocalizeStrings.Get(10798795)); // remove all movie details (selected film)
            choiceViewMenu.Add("updremovealldetails");
          }

          //if (Helper.FieldIsSet(MyFilms.conf.StrStorage) && (MyFilms.conf.WindowsFileDialog))
          if (Helper.FieldIsSet(MyFilms.conf.StrStorage))
          {
            dlgmenu.Add(GUILocalizeStrings.Get(10798636)); //filename
            choiceViewMenu.Add("fileselect");
          }

          if (ExtendedStartmode(MyFilmsDetail.PluginMode.Extended, "Details context: update mediainfos"))
          {
            dlgmenu.Add(GUILocalizeStrings.Get(10798708)); //update mediainfos
            choiceViewMenu.Add("updmediainfos");
          }

          if (MyFilms.conf.UseThumbsForPersons && !string.IsNullOrEmpty(MyFilms.conf.StrPathArtist))
          {
            dlgmenu.Add(GUILocalizeStrings.Get(1079883)); // Update info for all involved persons (IMDb)
            choiceViewMenu.Add("personimages");
          }

          dlgmenu.DoModal(GetID);
          if (dlgmenu.SelectedLabel == -1)
          {
            Change_Menu("mainmenu");
            return;
          }
          Change_Menu(choiceViewMenu[dlgmenu.SelectedLabel].ToLower());
          #endregion
          break;

        case "globalmappings": // map useritems from GUI
          #region globalmappings
          var dlg3 = (GUIDialogMenu)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_MENU);
          if (dlg3 == null) return;
          dlg3.Reset();
          dlg3.SetHeading(GUILocalizeStrings.Get(10798771)); // Display options ...
          var choiceGlobalMappings = new List<string>();

          #region populate menu
          dlg3.Add(GUILocalizeStrings.Get(10798820) + " 1 (" + MyFilms.conf.StritemDetails1 + "-" + MyFilms.conf.StrlabelDetails1 + ")"); // Details Display Item ....
          choiceGlobalMappings.Add("useritemdetails1");
          dlg3.Add(GUILocalizeStrings.Get(10798820) + " 2 (" + MyFilms.conf.StritemDetails2 + "-" + MyFilms.conf.StrlabelDetails2 + ")");
          choiceGlobalMappings.Add("useritemdetails2");
          dlg3.Add(GUILocalizeStrings.Get(10798820) + " 3 (" + MyFilms.conf.StritemDetails3 + "-" + MyFilms.conf.StrlabelDetails3 + ")");
          choiceGlobalMappings.Add("useritemdetails3");
          dlg3.Add(GUILocalizeStrings.Get(10798820) + " 4 (" + MyFilms.conf.StritemDetails4 + "-" + MyFilms.conf.StrlabelDetails4 + ")");
          choiceGlobalMappings.Add("useritemdetails4");
          dlg3.Add(GUILocalizeStrings.Get(10798820) + " 5 (" + MyFilms.conf.StritemDetails5 + "-" + MyFilms.conf.StrlabelDetails5 + ")");
          choiceGlobalMappings.Add("useritemdetails5");
          dlg3.Add(GUILocalizeStrings.Get(10798820) + " 6 (" + MyFilms.conf.StritemDetails6 + "-" + MyFilms.conf.StrlabelDetails6 + ")");
          choiceGlobalMappings.Add("useritemdetails6");

          // master-, secondary-  and sorttitle
          //dlg3.Add(GUILocalizeStrings.Get(10798790) + " (" + MyFilms.conf.StrTitle1 + "-" + BaseMesFilms.Translate_Column(MyFilms.conf.StrTitle1) + ")"); // mastertitle
          dlg3.Add(GUILocalizeStrings.Get(10798790) + " (" + MyFilms.conf.StrTitle1 + "-" + BaseMesFilms.TranslateColumn(MyFilms.conf.StrTitle1) + ")"); // mastertitle
          choiceGlobalMappings.Add("mastertitle");
          dlg3.Add(GUILocalizeStrings.Get(10798791) + " (" + MyFilms.conf.StrTitle2 + "-" + BaseMesFilms.TranslateColumn(MyFilms.conf.StrTitle2) + ")"); // secondary title
          choiceGlobalMappings.Add("secondarytitle");
          dlg3.Add(GUILocalizeStrings.Get(10798792) + " (" + MyFilms.conf.StrSTitle + "-" + BaseMesFilms.TranslateColumn(MyFilms.conf.StrSTitle) + ")"); // sort title
          choiceGlobalMappings.Add("sorttitle");
          #endregion

          dlg3.DoModal(GetID);
          if (dlg3.SelectedLabel == -1)
          {
            Change_Menu("mainmenu");
            return;
          }
          int selection = dlg3.SelectedLabel;
          string strUserItemSelection = choiceGlobalMappings[dlg3.SelectedLabel];
          dlg3.Reset();
          choiceGlobalMappings.Clear();

          dlg3.SetHeading(GUILocalizeStrings.Get(10798772)); // Choose field ...
          #region populate menu with choices
          switch (strUserItemSelection)
          {
            case "mastertitle":
            case "sorttitle":
              break;
            case "secondarytitle":
              dlg3.Add("<" + GUILocalizeStrings.Get(10798774) + ">"); // empty
              choiceGlobalMappings.Add("(none)");
              break;
            default:
              dlg3.Add("<" + GUILocalizeStrings.Get(10798774) + ">"); // empty
              choiceGlobalMappings.Add("");
              break;
          }
          if (selection > 5) // title fields
          {
            ArrayList displayItems = MyFilms.GetDisplayItems("titles");
            foreach (string[] displayItem in displayItems)
            {
              dlg3.Add(displayItem[0] + "-" + displayItem[1]);
              choiceGlobalMappings.Add(displayItem[0]);
            }
          }
          else // display item fields
          {
            ArrayList displayItems = MyFilms.GetDisplayItems("viewitems");
            foreach (string[] displayItem in displayItems)
            {
              dlg3.Add(displayItem[1] + " (" + displayItem[0] + ")");
              choiceGlobalMappings.Add(displayItem[0]);
            }
          }
          #endregion

          dlg3.DoModal(GetID);
          if (dlg3.SelectedLabel == -1)
          {
            Change_Menu("mainmenu");
            return;
          }

          string selectionLabel = choiceGlobalMappings[dlg3.SelectedLabel];
          dlg3.Reset();
          choiceGlobalMappings.Clear();
          LogMyFilms.Debug("Display Options - new field: '" + selectionLabel + "', new Label: '" + BaseMesFilms.TranslateColumn(selectionLabel) + "'.");
          MyFilms.UpdateUseritemWithValue(strUserItemSelection, selectionLabel);
          MyFilms.UpdateUserItems(); // save to currentconfig - save time for WinDeInit
          //Configuration.SaveConfiguration(Configuration.CurrentConfig, facadeFilms.SelectedListItem.ItemId, facadeFilms.SelectedListItem.Label);
          //Load_Config(Configuration.CurrentConfig, true);
          Init_Detailed_DB(false); // clear properties 
          afficher_detail(true);
          return;
          #endregion

        case "fanartcovermenu":
          #region fanart and cover menu (currently not used)
          if (dlgmenu == null) return;
          dlgmenu.Reset();
          choiceViewMenu.Clear();
          dlgmenu.SetHeading(GUILocalizeStrings.Get(10798703)); // Fanart & Cover ...

          int iCovercount = 0;
          bool success = int.TryParse(ChangeLocalCover((DataRow[])MyFilms.r, (int)MyFilms.conf.StrIndex, true, true), out iCovercount);
          if (iCovercount > 1)
          {
            dlgmenu.Add(GUILocalizeStrings.Get(10798762) + " " + ChangeLocalCover((DataRow[])MyFilms.r, (int)MyFilms.conf.StrIndex, true, true)); // Change Cover
            choiceViewMenu.Add("changecover");
          }

          //dlgmenu.Add(GUILocalizeStrings.Get(10798763)); // Covermanager ...
          //choiceViewMenu.Add("covermanager");

          dlgmenu.Add(GUILocalizeStrings.Get(10798766)); // Load single Cover ...
          choiceViewMenu.Add("loadcover");

          dlgmenu.Add(GUILocalizeStrings.Get(10798764)); // Load Covers ...
          choiceViewMenu.Add("loadmulticover");

          dlgmenu.Add(GUILocalizeStrings.Get(10798761)); // Load Covers (TMDB)
          choiceViewMenu.Add("tmdbposter");

          if (ExtendedStartmode(MyFilmsDetail.PluginMode.Extended, "Details context: Thumb creator)"))
          {
            dlgmenu.Add(GUILocalizeStrings.Get(10798728));
            //Create Thumb from movie - if no cover available, e.g. with documentaries
            choiceViewMenu.Add("cover-thumbnailer");
          }

          if (MyFilms.conf.StrFanart)
          {
            if (ExtendedStartmode(MyFilmsDetail.PluginMode.Extended, "Details context: Fanart Manager ..."))
            {
              dlgmenu.Add(GUILocalizeStrings.Get(10798766)); // Fanart Manager ...
              choiceViewMenu.Add("fanartmanager");
            }

            dlgmenu.Add(GUILocalizeStrings.Get(1079874)); // Remove Fanart
            choiceViewMenu.Add("deletefanart");

            dlgmenu.Add(GUILocalizeStrings.Get(1079851));
            // Create single fanart from movie as multi image (local)
            choiceViewMenu.Add("createfanartmultiimage");

            dlgmenu.Add(GUILocalizeStrings.Get(1079849)); // create single images fanart from movie (local)
            choiceViewMenu.Add("createfanartsingleimages");

            dlgmenu.Add(GUILocalizeStrings.Get(1079853)); // create fanart from movie (local)
            choiceViewMenu.Add("createfanart");

            if (!g_Player.Stopped && g_Player.HasVideo && !string.IsNullOrEmpty(g_Player.CurrentFile))
            {
              dlgmenu.Add(GUILocalizeStrings.Get(1079852));
              // Create single fanart from movie on current position (local)
              choiceViewMenu.Add("createfanartonposition");
            }

            dlgmenu.Add(GUILocalizeStrings.Get(1079862)); // Download Fanart (online)
            choiceViewMenu.Add("fanart");
          }

          dlgmenu.DoModal(GetID);
          if (dlgmenu.SelectedLabel == -1)
          {
            Change_Menu("mainmenu");
            return;
          }
          Change_Menu(choiceViewMenu[dlgmenu.SelectedLabel].ToLower());
          #endregion
          break;

        case "traktinternal":
          #region trakt internal menu - including context and noncontext items
          if (!TraktInternalMenu(MyFilms.currentMovie))
          {
            Change_Menu("mainmenu");
          }
          #endregion
          break;

        case "trakt":
          #region trakt main menu
          if (dlgmenu == null) return;
          dlgmenu.Reset();
          choiceViewMenu.Clear();
          dlgmenu.SetHeading(GUILocalizeStrings.Get(10798775)); // Trakt...

          dlgmenu.Add(GUILocalizeStrings.Get(10798776)); // 
          choiceViewMenu.Add("trakt-Main");

          //dlgmenu.Add(GUILocalizeStrings.Get(10798777)); // 
          //choiceViewMenu.Add("trakt-Calendar");

          dlgmenu.Add(GUILocalizeStrings.Get(10798778)); // Network
          choiceViewMenu.Add("trakt-Network");

          dlgmenu.Add(GUILocalizeStrings.Get(10798779)); // 
          choiceViewMenu.Add("trakt-RecommendationsMovies");

          dlgmenu.Add(GUILocalizeStrings.Get(10798780)); // 
          choiceViewMenu.Add("trakt-TrendingMovies");

          dlgmenu.Add(GUILocalizeStrings.Get(10798781)); // 
          choiceViewMenu.Add("trakt-WatchedListMovies");

          dlgmenu.Add(GUILocalizeStrings.Get(10798783)); // 
          choiceViewMenu.Add("trakt-AddToWatchedListMovies");

          dlgmenu.Add(GUILocalizeStrings.Get(10798786)); // 
          choiceViewMenu.Add("trakt-Lists");

          dlgmenu.Add(GUILocalizeStrings.Get(10798785)); // 
          choiceViewMenu.Add("trakt-AddRemoveMovieInUserlist");

          dlgmenu.Add(GUILocalizeStrings.Get(10798782)); // Shouts
          choiceViewMenu.Add("trakt-Shouts");

          dlgmenu.Add(GUILocalizeStrings.Get(10798784)); // Rate
          choiceViewMenu.Add("trakt-Rate");

          dlgmenu.Add(GUILocalizeStrings.Get(10798787)); // 
          choiceViewMenu.Add("trakt-RelatedMovies");

          dlgmenu.Add(GUILocalizeStrings.Get(10798788)); // Search people ...
          choiceViewMenu.Add("trakt-SearchPeople");

          dlgmenu.DoModal(GetID);
          if (dlgmenu.SelectedLabel == -1)
          {
            Change_Menu("mainmenu");
            return;
          }
          Change_Menu(choiceViewMenu[dlgmenu.SelectedLabel]);
          #endregion
          break;

        case "trakt-Main":
          GUIWindowManager.ActivateWindow((int)TraktGuiWindows.Main, "");
          break;

        case "trakt-Calendar":
          GUIWindowManager.ActivateWindow((int)TraktGuiWindows.Calendar, "");
          break;

        case "trakt-Network":
          GUIWindowManager.ActivateWindow((int)TraktGuiWindows.Network, "");
          break;

        case "trakt-RecommendationsMovies":
          GUIWindowManager.ActivateWindow((int)TraktGuiWindows.RecommendationsMovies, "");
          break;

        case "trakt-TrendingMovies":
          GUIWindowManager.ActivateWindow((int)TraktGuiWindows.TrendingMovies, "");
          break;

        case "trakt-WatchedListMovies":
          GUIWindowManager.ActivateWindow((int)TraktGuiWindows.WatchedListMovies, "");
          break;

        case "trakt-AddToWatchedListMovies":
          GUIUtils.ShowErrorDialog(Helper.IsTraktAvailableAndEnabledAndNewVersion
            ? "This feature is no more supported - use the Trakt menu instead!"
            : "Your installed Trakt Version does not allow this feature!");
          break;

        case "trakt-Lists":
          if (Helper.IsTraktAvailableAndEnabledAndNewVersion)
          {
            GUIWindowManager.ActivateWindow((int)TraktGuiWindows.Lists, "");
          }
          else
          {
            GUIUtils.ShowErrorDialog("Your installed Trakt Version does not allow this feature!");
          }
          break;

        case "trakt-AddRemoveMovieInUserlist":
          if (Helper.IsTraktAvailableAndEnabledAndNewVersion)
          {
            TraktAddRemoveMovieInUserlist(MyFilms.currentMovie, false);
          }
          else
          {
            GUIUtils.ShowErrorDialog("Your installed Trakt Version does not allow this feature!");
          }
          break;

        case "trakt-Shouts":
          movie = GetMovieFromRecord(MyFilms.r[MyFilms.conf.StrIndex]);
          TraktShout(movie);
          //TraktShout(MyFilms.currentMovie);
          //GUIWindowManager.ActivateWindow((int)TraktGUIWindows.Shouts);
          break;

        case "trakt-Rate":
          GUIUtils.ShowErrorDialog(Helper.IsTraktAvailableAndEnabled
            ? "This feature is no more supported - use the Trakt menu instead!"
            : "Your installed Trakt Version does not allow this feature!");
          break;

        case "trakt-RelatedMovies":
          if (Helper.IsTraktAvailableAndEnabled)
          {
            TraktRelatedMovies(MyFilms.currentMovie);
          }
          else
          {
            GUIUtils.ShowErrorDialog("Your installed Trakt Version does not allow this feature!");
          }
          break;

        case "trakt-SearchPeople":
          if (Helper.IsTraktAvailableAndEnabledAndNewVersion)
          {
            TraktSearchPeople(MyFilms.currentMovie);
          }
          else
          {
            GUIUtils.ShowErrorDialog("Your installed Trakt Version does not allow this feature!");
          }
          break;

        case "subtitles":
          if (MyFilms.r[MyFilms.conf.StrIndex][MyFilms.conf.StrTitle1].ToString() != null) // ShowSubtitleMenu(MyFilms.r[MyFilms.conf.StrIndex][MyFilms.conf.StrTitle1].ToString());
          {
            if (Helper.IsSubCentralAvailableAndEnabled) GUIWindowManager.ActivateWindow((int)MyFilms.ExternalPluginWindows.SubCentral);
          }
          break;

        case "fileselect":
          #region file selection (source)
          string wfile = string.Empty;
          string wdirectory = string.Empty;
          if (File.Exists(MyFilms.r[MyFilms.conf.StrIndex][MyFilms.conf.StrStorage].ToString())) // Check if Sourcefile exists
          {
            wfile = MyFilms.r[MyFilms.conf.StrIndex][MyFilms.conf.StrStorage].ToString();
            wdirectory = Path.GetDirectoryName(wfile);
          }
          keyboard.Reset();
          keyboard.SetLabelAsInitialText(false); // set to false, otherwise our intial text is cleared
          keyboard.Text = MyFilms.r[MyFilms.conf.StrIndex][MyFilms.conf.StrStorage].ToString();
          keyboard.DoModal(GetID);
          wfile = keyboard.IsConfirmed ? keyboard.Text : string.Empty;
          if (wfile != string.Empty)
          {
            MyFilms.r[MyFilms.conf.StrIndex][MyFilms.conf.StrStorage] = wfile;
            Update_XML_database();
            afficher_detail(true);
          }
          #endregion
          break;

        case "delete":
          {
            #region delete item
            if (dlgmenu == null) return;
            dlgmenu.Reset();
            choiceViewMenu.Clear();
            dlgmenu.SetHeading(GUILocalizeStrings.Get(1079830)); // Delete movie ...

            dlgmenu.Add(GUILocalizeStrings.Get(1079831)); // Remove movie from catalog
            choiceViewMenu.Add("removefromdb");

            dlgmenu.Add(GUILocalizeStrings.Get(1079832)); // Delete movie file(s) from disk
            choiceViewMenu.Add("deletefromdisk");

            dlgmenu.Add(GUILocalizeStrings.Get(1079833)); // Delete from catalog and disk
            choiceViewMenu.Add("deletefromdbanddisk");

            dlgmenu.DoModal(GetID);
            if (dlgmenu.SelectedLabel == -1)
            {
              Change_Menu("mainmenu");
              return;
            }
            Change_Menu(choiceViewMenu[dlgmenu.SelectedLabel].ToLower());
            #endregion
            break;
          }

        case "moviepersonlist":
          {
            #region display person list of current movie in main screen
            MyFilms.internalLoadParam = "moviepersonlist";
            GUIWindowManager.ActivateWindow(MyFilms.ID_MyFilms,false);
            #endregion
            break;
          }

        case "removefromdb":
          #region remove from DB
          
          dlgYesNo.Reset();
          dlgYesNo.SetHeading(GUILocalizeStrings.Get(1079831)); //Remove movie from catalog
          dlgYesNo.SetLine(2, GUILocalizeStrings.Get(433)); //confirm suppression
          dlgYesNo.DoModal(GetID);
          if (dlgYesNo.IsConfirmed)
          {
            // MyFilmsDetail.Suppress_Entry((DataRow[])MyFilms.r, (int)MyFilms.conf.StrIndex);
            ManualDelete(MyFilms.r[MyFilms.conf.StrIndex], true, false);
            // Update_XML_database();
            MyFilms.r = BaseMesFilms.ReadDataMovies(MyFilms.conf.StrDfltSelect, MyFilms.conf.StrFilmSelect, MyFilms.conf.StrSorta, MyFilms.conf.StrSortSens);
            afficher_detail(true);
            return;
          }
          if (dlgYesNo.SelectedLabel == -1)
          {
            Change_Menu("delete");
          }
          #endregion
          break;

        case "deletefromdisk":
          #region delete item from disk
          dlgYesNo.Reset();
          dlgYesNo.SetHeading(GUILocalizeStrings.Get(1079832)); //Delete movie file(s) from disk
          dlgYesNo.SetLine(1, GUILocalizeStrings.Get(927)); // warning
          dlgYesNo.SetLine(2, GUILocalizeStrings.Get(1079834));
          //If you confirm, you media files will physically be deleted !
          dlgYesNo.SetLine(3, GUILocalizeStrings.Get(1079835)); //Are you sure you want to delete movie ?
          dlgYesNo.DoModal(GetID);
          if (dlgYesNo.IsConfirmed)
          {
            ManualDelete(MyFilms.r[MyFilms.conf.StrIndex], false, true);
            MyFilms.r = BaseMesFilms.ReadDataMovies(MyFilms.conf.StrDfltSelect, MyFilms.conf.StrFilmSelect, MyFilms.conf.StrSorta, MyFilms.conf.StrSortSens);
            afficher_detail(true);
            return;
          }
          if (dlgYesNo.SelectedLabel == -1)
          {
            Change_Menu("delete");
          }
          #endregion
          break;

        case "deletefromdbanddisk":
          #region delete item from DB and disk
          dlgYesNo.Reset();
          dlgYesNo.SetHeading(GUILocalizeStrings.Get(1079833)); //Delete from catalog and disk
          dlgYesNo.SetLine(1, GUILocalizeStrings.Get(927)); // warning
          dlgYesNo.SetLine(2, GUILocalizeStrings.Get(1079834));
          //If you confirm, you media files will physically be deleted !
          dlgYesNo.SetLine(3, GUILocalizeStrings.Get(1079835)); //Are you sure you want to delete movie ?
          dlgYesNo.DoModal(GetID);
          if (dlgYesNo.IsConfirmed)
          {
            ManualDelete(MyFilms.r[MyFilms.conf.StrIndex], true, true);
            MyFilms.r = BaseMesFilms.ReadDataMovies(MyFilms.conf.StrDfltSelect, MyFilms.conf.StrFilmSelect, MyFilms.conf.StrSorta, MyFilms.conf.StrSortSens);
            afficher_detail(true);
            return;
          }
          if (dlgYesNo.SelectedLabel == -1)
          {
            Change_Menu("delete");
          }
          #endregion
          break;

        case "updproperty":
          {
            #region build menu
            List<string> choiceUpd = new List<string>();
            if (dlgmenu == null) return;
            dlgmenu.Reset();
            dlgmenu.SetHeading(GUILocalizeStrings.Get(10798643)); // menu

            dlgmenu.Add(" " + BaseMesFilms.TranslateColumn(MyFilms.conf.StrTitle1));
            choiceUpd.Add(MyFilms.conf.StrTitle1);

            if (Helper.FieldIsSet(MyFilms.conf.StrTitle2))
            {
              dlgmenu.Add(" " + BaseMesFilms.TranslateColumn(MyFilms.conf.StrTitle2));
              choiceUpd.Add(MyFilms.conf.StrTitle2);
            }

            if (Helper.FieldIsSet(MyFilms.conf.StrStorage)) // Source field / media file name
            {
              dlgmenu.Add(" " + BaseMesFilms.TranslateColumn(MyFilms.conf.StrStorage));
              choiceUpd.Add(MyFilms.conf.StrStorage);
            }

            string[] defaultupdateitems = new string[] { "Category", "Year", "Date", "Country", "Rating" };
            foreach (string wupd in defaultupdateitems)
            {
              dlgmenu.Add(" " + BaseMesFilms.TranslateColumn(wupd));
              choiceUpd.Add(wupd.Trim());
            }

            dlgmenu.Add(GUILocalizeStrings.Get(10798765)); // *** show all ***
            choiceUpd.Add("showall");

            dlgmenu.DoModal(GetID);
            if (dlgmenu.SelectedLabel == -1) Change_Menu("mainmenu"); // go back to main contextmenu

            // show all search fields, if selected ...
            if (choiceUpd[dlgmenu.SelectedLabel] == "showall")
            {
              dlgmenu.Reset();
              dlgmenu.SetHeading(GUILocalizeStrings.Get(10798643)); // menu
              choiceUpd.Clear();
              ArrayList displayItems = MyFilms.GetDisplayItems("view");
              foreach (string[] displayItem in displayItems)
              {
                string entry = string.IsNullOrEmpty(displayItem[1]) ? displayItem[0] : displayItem[1];
                dlgmenu.Add(" " + entry);
                choiceUpd.Add(displayItem[0]);
                LogMyFilms.Debug("Update properties menu - add '{0}' as '{1}'", displayItem[0], entry);
              }
              dlgmenu.DoModal(GetID);
              if (dlgmenu.SelectedLabel == -1) Change_Menu("mainmenu"); // go back to main contextmenu
            }
            #endregion
            string wproperty = choiceUpd[dlgmenu.SelectedLabel];
            #region update selected property

            dlgmenu.Reset();
            keyboard.Reset();
            keyboard.SetLabelAsInitialText(false); // set to false, otherwise our intial text is cleared
            keyboard.Text = MyFilms.r[MyFilms.conf.StrIndex][wproperty].ToString();
            keyboard.DoModal(GetID);
            if (keyboard.IsConfirmed)
            {
              switch (ds.Movie.Columns[wproperty].DataType.Name)
              {
                case "Decimal":
                  try
                  {
                    MyFilms.r[MyFilms.conf.StrIndex][wproperty] = Convert.ToDecimal(keyboard.Text);
                  }
                  catch
                  {
                    GUIUtils.ShowOKDialog(GUILocalizeStrings.Get(10798642), GUILocalizeStrings.Get(10798644)); // wrong input
                    return;
                  }
                  break;
                case "Int32":
                  try
                  {
                    MyFilms.r[MyFilms.conf.StrIndex][wproperty] = Convert.ToInt32(keyboard.Text);
                  }
                  catch
                  {
                    GUIUtils.ShowOKDialog(GUILocalizeStrings.Get(10798642), GUILocalizeStrings.Get(10798644)); // wrong input
                    return;
                  }
                  break;
                default:
                  MyFilms.r[MyFilms.conf.StrIndex][wproperty] = keyboard.Text;
                  break;
              }
              Update_XML_database();
              afficher_detail(true);
            }
            break;

            #endregion
          }

        case "updremovealldetails":
          #region reset movie details
          ArrayList deleteItems = MyFilms.GetDisplayItems("deletedetails");
          foreach (string wproperty in deleteItems.Cast<string[]>().Select(displayItem => displayItem[0]).Where(wproperty => !string.IsNullOrEmpty(wproperty) && MyFilms.r[MyFilms.conf.StrIndex][wproperty] != DBNull.Value))
          {
            try
            {
              switch (ds.Movie.Columns[wproperty].DataType.Name)
              {
                case "DateTime":
                  MyFilms.r[MyFilms.conf.StrIndex][wproperty] = DateTime.Now;
                  break;
                case "Decimal":
                  MyFilms.r[MyFilms.conf.StrIndex][wproperty] = 0;
                  break;
                case "Int32":
                  MyFilms.r[MyFilms.conf.StrIndex][wproperty] = 0;
                  break;
                default:
                  MyFilms.r[MyFilms.conf.StrIndex][wproperty] = "";
                  break;
              }
              LogMyFilms.Debug("Delete value for property '" + wproperty + "'");
            }
            catch (Exception ex)
            {
              LogMyFilms.Debug("Error deleting value for property '" + wproperty + "', exception: ", ex.Message);
            }
          }
          Update_XML_database();
          afficher_detail(true);
          #endregion
          break;

        case "updmediainfos":
          {
            #region update mediainfo
            string FileDate = string.Empty;
            string VideoPlaytime = string.Empty;
            string VideoCodec = string.Empty;
            string VideoFormat = string.Empty;
            string VideoFormatProfile = string.Empty;
            string VideoBitRate = string.Empty;
            string VideoFrameRate = string.Empty;
            string VideoWidth = string.Empty;
            string VideoHeight = string.Empty;
            string VideoAspectRatio = string.Empty;

            string AudioCodec = string.Empty;
            string AudioFormat = string.Empty;
            string AudioFormatProfile = string.Empty;
            string AudioBitrate = string.Empty;
            string AudioChannels = string.Empty;
            string AudioTracks = string.Empty;

            string TextCount = string.Empty;

            long TotalSize = 0;
            int TotalRuntime = 0;

            string source = MyFilms.r[MyFilms.conf.StrIndex][MyFilms.conf.StrStorage].ToString();
            string[] files = source.Split(new Char[] { ';' });

            foreach (string file in files)
            {
              LogMyFilms.Debug("Mediainfo - Filename: '" + file + "'");
              if (File.Exists(file))
              {
                // Get File Date Added/Created
                FileDate = GetFileTimeStamps(file);
                LogMyFilms.Debug("Mediainfo - FileDate: '" + FileDate + "'");

                FileInfo fi = new FileInfo(file);
                TotalSize += fi.Length;

                // ReadMediaInfo(file, ref mediainfo);
                MediaInfo mediainfo = MediaInfo.GetInstance();

                // MediaInfo Object could not be created
                if (null == mediainfo)
                  return;

                // Check if File Exists and is not an Image type e.g. ISO (we can't extract mediainfo from that)
                if (File.Exists(file) && !Helper.IsImageFile(file))
                {
                  try
                  {
                    LogMyFilms.Debug("Attempting to read Mediainfo for " + file);

                    // open file in MediaInfo
                    mediainfo.Open(file);

                    // check number of failed attempts at mediainfo extraction                    
                    int noAttempts = 0;

                    // Get Playtime (runtime)
                    string result = mediainfo.VideoPlaytime;

                    string LocalPlaytime = result != "-1" ? result : noAttempts.ToString();

                    VideoPlaytime = mediainfo.VideoPlaytime;
                    LogMyFilms.Debug("Mediainfo - VideoPlaytime: '" + VideoPlaytime + "'");
                    TotalRuntime += Int32.Parse(VideoPlaytime);

                    VideoCodec = mediainfo.VideoCodec;
                    LogMyFilms.Debug("Mediainfo - Videocodec: '" + VideoCodec + "'");
                    VideoFormat = mediainfo.VideoCodecFormat;
                    LogMyFilms.Debug("Mediainfo - VideoCodecFormat: '" + VideoFormat + "'");
                    VideoFormatProfile = mediainfo.VideoFormatProfile;
                    LogMyFilms.Debug("Mediainfo - VideoFormatProfile: '" + VideoFormatProfile + "'");
                    VideoBitRate = mediainfo.VideoBitrate;
                    LogMyFilms.Debug("Mediainfo - VideoBitrate: '" + VideoBitRate + "'");
                    VideoFrameRate = mediainfo.VideoFramesPerSecond;
                    LogMyFilms.Debug("Mediainfo - VideoFramesPerSecond: '" + VideoFrameRate + "'");
                    VideoWidth = mediainfo.VideoWidth;
                    LogMyFilms.Debug("Mediainfo - VideoWidth: '" + VideoWidth + "'");
                    VideoHeight = mediainfo.VideoHeight;
                    LogMyFilms.Debug("Mediainfo - VideoHeight: '" + VideoHeight + "'");
                    VideoAspectRatio = mediainfo.VideoAspectRatio;
                    LogMyFilms.Debug("Mediainfo - VideoAspectRatio: '" + VideoAspectRatio + "'");

                    AudioCodec = mediainfo.AudioCodec;
                    LogMyFilms.Debug("Mediainfo - AudioCodec: '" + AudioCodec + "'");
                    AudioFormat = mediainfo.AudioCodecFormat;
                    LogMyFilms.Debug("Mediainfo - AudioCodecFormat: '" + AudioFormat + "'");
                    AudioFormatProfile = mediainfo.AudioFormatProfile;
                    LogMyFilms.Debug("Mediainfo - AudioFormatProfile: '" + AudioFormatProfile + "'");
                    AudioBitrate = mediainfo.AudioBitrate;
                    LogMyFilms.Debug("Mediainfo - AudioBitrate: '" + AudioBitrate + "'");
                    AudioChannels = mediainfo.AudioChannelCount;
                    LogMyFilms.Debug("Mediainfo - AudioChannelCount: '" + AudioChannels + "'");
                    AudioTracks = mediainfo.AudioStreamCount;
                    LogMyFilms.Debug("Mediainfo - AudioStreamCount: '" + AudioTracks + "'");

                    TextCount = mediainfo.SubtitleCount;
                    LogMyFilms.Debug("Mediainfo - SubtitleCount: '" + TextCount + "'");

                    // MediaInfo cleanup
                    mediainfo.Close();
                  }
                  catch (Exception ex)
                  {
                    LogMyFilms.Debug("Error reading MediaInfo: " + ex.Message);
                  }

                }
                LogMyFilms.Debug("File '" + file + "' does not exist or is an image file");


              }
              else
                LogMyFilms.Debug("Mediainfo - File '" + file + "' does not exist !");
            }
            int size = (int)(TotalSize / 1024 / 1024);
            string strSize = string.Format("{0}", size);
            //string humanKBSize = string.Format("{0} KB", size);
            //string humanMBSize = string.Format("{0} MB", size / 1024);
            //string humanGBSize = string.Format("{0} GB", size / 1024 / 1024);
            LogMyFilms.Debug("Mediainfo - TotalSize: '" + strSize + "'");
            LogMyFilms.Debug("Mediainfo - TotalRuntime: '" + TotalRuntime.ToString() + "'");

            //MyFilms.r[MyFilms.conf.StrIndex]["Length"] = TotalRuntime.ToString();
            //MyFilms.r[MyFilms.conf.StrIndex]["VideoFormat"] = string.Empty;
            //MyFilms.r[MyFilms.conf.StrIndex]["VideoBitrate"] = string.Empty;
            //MyFilms.r[MyFilms.conf.StrIndex]["AudioFormat"] = string.Empty;
            //MyFilms.r[MyFilms.conf.StrIndex]["AudioBitrate"] = string.Empty;
            //MyFilms.r[MyFilms.conf.StrIndex]["Resolution"] = string.Empty;
            //MyFilms.r[MyFilms.conf.StrIndex]["Framerate"] = string.Empty;
            //MyFilms.r[MyFilms.conf.StrIndex]["Languages"] = string.Empty;
            //MyFilms.r[MyFilms.conf.StrIndex]["Subtitles"] = string.Empty;
            //MyFilms.r[MyFilms.conf.StrIndex]["DateAdded"] = string.Empty;
            //MyFilms.r[MyFilms.conf.StrIndex]["Size"] = string.Format("{0}", size); ;
            //MyFilms.r[MyFilms.conf.StrIndex]["Disks"] = split.Count().ToString();
            //MyFilms.r[MyFilms.conf.StrIndex]["Aspectratio"] = string.Empty;
            //Update_XML_database();
            //afficher_detail(true);
            #endregion
          }
          break;

        case "grabber":
          #region grabber
          bool wChooseScript = MyFilms.conf.StrGrabber_ChooseScript;
          if (!System.IO.File.Exists(MyFilms.conf.StrGrabber_cnf) && !MyFilms.conf.StrGrabber_ChooseScript)
          {
            dlgYesNo.SetHeading(GUILocalizeStrings.Get(107986));//my films
            dlgYesNo.SetLine(1, string.Format(GUILocalizeStrings.Get(1079875), MyFilms.conf.StrGrabber_cnf));//File doesn't exist. Do you want to choose it ?
            dlgYesNo.SetLine(2, GUILocalizeStrings.Get(1079878));//confirm suppression
            dlgYesNo.DoModal(GetID);
            if (dlgYesNo.IsConfirmed)
              wChooseScript = true;
            else
            {
              LogMyFilms.Info("My Films : The grabber config file doesn't exists. No grab Information done !");
              break;
            }
          }
          title = GetSearchTitle(MyFilms.r, MyFilms.conf.StrIndex, "");
          mediapath = GetMediaPathOfFirstFile(MyFilms.r, MyFilms.conf.StrIndex);
          sTitles = GetSearchTitles(MyFilms.r[MyFilms.conf.StrIndex], mediapath);

          // this will be executed after background thread finished
          doUpdateDetailsViewByFinishEvent = true;
          grabb_Internet_Informations(title, GetID, wChooseScript, MyFilms.conf.StrGrabber_cnf, mediapath, GrabType.All, false, sTitles, m_SearchAnimation);
          // afficher_detail(true); // -> will be executes by OnDetailsUpdated message handler later ...
          SetProcessAnimationStatus(false, m_SearchAnimation); // make sure it's switched off
          #endregion
          break;

        case "ant-nfo-reader":
          GUIUtils.ShowOKDialog("Action not yet implemented");
          break;

        case "ant-nfo-writer":
          GUIUtils.ShowOKDialog("Action not yet implemented");
          break;

        case "trailer-tmdb":
          if (!Helper.IsOnlineVideosAvailableAndEnabled)
          {
            GUIUtils.ShowNotifyDialog("OnlineVideos is not available!");
            return;
          }
          SearchAndDownloadTrailerOnlineTmdb(MyFilms.r, MyFilms.conf.StrIndex, false, true, (MyFilms.conf.StrDirStorTrailer.Length > 0) ? MyFilms.conf.StrDirStorTrailer : null); // MyFilmsDetail.SearchAndDownloadTrailerOnlineTMDB(r, MyFilms.conf.StrIndex, false, true, null);
          break;

        case "cover-thumbnailer":
          CreateThumbFromMovie();
          GUIUtils.ShowOKDialog(GUILocalizeStrings.Get(107986), "Cover created from movie");
          //ToDo: Add Dialog to let user choose, if cover should replace existing one (remove skip existing logic for that!)
          break;

        case "trailer-register":
          {
            SetProcessAnimationStatus(true, m_SearchAnimation);
            //Zuerst Pfad lesen, dann Dateien suchen, in liste packen, Auswahlmenü präsentieren und zum Schluß Update des Records 
            // Suchen nach Files mit folgendem Kriterium:
            // 1.) ... die den Filmnamen im Filenamen haben und im Trailerverzeichnis gefunden werden (wahrscheinlich HD, daher an 1. Stelle setzen)
            // 2.) Im Verzeichnis des Films suchen nach Filmdateien die das Wort "Trailer" im Namen haben (Endung beliebig: avi, mov, flv, etc.)
            // 3.) Im (Trailer)-Suchpfad nach Verzeichnissen, die nach dem Filmnamen benannt sind - dann alle Files darin registrien

            LogMyFilms.Debug("SelectedItemInfo from (MyFilms.r[MyFilms.conf.StrIndex]: '" + (MyFilms.r[MyFilms.conf.StrIndex] + "'"));
            SearchTrailerLocal(MyFilms.r, MyFilms.conf.StrIndex, true, true);
            SetProcessAnimationStatus(false, m_SearchAnimation);
            afficher_detail(true);
            GUIUtils.ShowOKDialog(MyFilms.r[MyFilms.conf.StrIndex][MyFilms.conf.StrSTitle].ToString(), result.Count.ToString() + " " + GUILocalizeStrings.Get(10798705), "", ""); // trailers found ! 
            break;
          }

        case "trailer-delete":
          dlgYesNo.SetHeading(GUILocalizeStrings.Get(107986));//my films
          dlgYesNo.SetLine(1, GUILocalizeStrings.Get(433));//confirm suppression
          dlgYesNo.DoModal(GetID);
          if (dlgYesNo.IsConfirmed)
          {
            DeleteTrailerFromDb(MyFilms.r, MyFilms.conf.StrIndex);
            //MyFilms.r = BaseMesFilms.ReadDataMovies(MyFilms.conf.StrDfltSelect, MyFilms.conf.StrFilmSelect, MyFilms.conf.StrSorta, MyFilms.conf.StrSortSens);
            afficher_detail(true);
          }
          break;

        case "personimages":
          if (!Helper.IsConnectedToInternet())
          {
            GUIUtils.ShowErrorDialog(GUILocalizeStrings.Get(703));
            break; // stop, if no internet available
          }
          Menu_LoadPersonImages();
          break;

        case "fanart":
          if (!Helper.IsConnectedToInternet())
          {
            GUIUtils.ShowErrorDialog(GUILocalizeStrings.Get(703));
            break; // stop, if no internet available
          }
          // Remove_Backdrops_Fanart(MyFilms.r[MyFilms.conf.StrIndex][MyFilms.conf.StrTitle1].ToString(), false); // do not remove, as user might only want to "update" fanart ...
          Menu_LoadFanart(false);
          break;

        case "createfanart": // create fanart from local media
          Menu_CreateFanart(GrabUtil.ArtworkFanartType.MultiImageWithMultipleSingleImages);
          break;

        case "createfanartsingleimages": // create single images fanart from local media
          Menu_CreateFanart(GrabUtil.ArtworkFanartType.MultipleSingleImages);
          break;

        case "createfanartmultiimage": // create single fanart from local media on pause position
          Menu_CreateFanart(GrabUtil.ArtworkFanartType.Multiimage);
          break;

        case "createfanartonposition": // create single fanart from local media on pause position
          Menu_CreateFanart_OnMoviePosition();
          afficher_detail(true);
          break;

        case "deletefanart":
          dlgYesNo.SetHeading(GUILocalizeStrings.Get(1079874));//Delete fanart
          dlgYesNo.SetLine(1, "");
          dlgYesNo.SetLine(2, GUILocalizeStrings.Get(433));//confirm suppression
          dlgYesNo.DoModal(GetID);
          if (dlgYesNo.IsConfirmed)
          {
            sTitles = GetSearchTitles(MyFilms.r[MyFilms.conf.StrIndex], "");
            Remove_Backdrops_Fanart(sTitles.FanartTitle, false);
            Remove_Backdrops_Fanart(sTitles.OriginalTitle, false);
            Remove_Backdrops_Fanart(sTitles.TranslatedTitle, false);
            Remove_Backdrops_Fanart(sTitles.FormattedTitle, false);
            Remove_Backdrops_Fanart(sTitles.MasterTitle, false);
            Remove_Backdrops_Fanart(sTitles.SecondaryTitle, false);
            Remove_Backdrops_Fanart(sTitles.SortTitle, false);
            Thread.Sleep(50);
            afficher_detail(true);
          }
          break;

        case "changecover":
          string covercount = ChangeLocalCover((DataRow[])MyFilms.r, (int)MyFilms.conf.StrIndex, true, false);
          afficher_detail(true);
          SetProcessAnimationStatus(false, m_SearchAnimation);
          Change_Menu("fanartcovermenu"); // stay in cover toggle menu
          break;

        case "covermanager":
          LogMyFilms.Debug("Switching to Cover Manager Window");
          MyFilmsCoverManager cm = null;
          if (cm == null)
          {
            cm = new MyFilmsCoverManager();
            GUIWindow cmwindow = (GUIWindow)cm;
            GUIWindowManager.Add(ref cmwindow);
            cm.Init();
          }
          // cm.MovieID = MyFilms.conf.StrIndex; // will be set later in cm class
          cm.setPageTitle("Cover Manager");
          //sTitles = GetSearchTitles(MyFilms.r[MyFilms.conf.StrIndex], GetMediaPathOfFirstFile(MyFilms.r, MyFilms.conf.StrIndex));
          //cm.ArtworkFileName = GetOrCreateCoverFilename(MyFilms.r, MyFilms.conf.StrIndex, sTitles.MasterTitle);
          GUIWindowManager.ActivateWindow(cm.GetID, false);
          break;

        case "fanartmanager":
          #region fanart manager
          LogMyFilms.Info("Fanart Manager : Not yet implemented - using old submenu instead!");
          if (dlgmenu == null) return;
          dlgmenu.Reset();
          choiceViewMenu.Clear();
          dlgmenu.SetHeading(GUILocalizeStrings.Get(10798767)); // Fanart Manager ...

          if (MyFilms.conf.StrFanart)
          {
            dlgmenu.Add(GUILocalizeStrings.Get(1079874)); // Remove Fanart
            choiceViewMenu.Add("deletefanart");

            dlgmenu.Add(GUILocalizeStrings.Get(1079851)); // Create single fanart from movie as multi image (local)
            choiceViewMenu.Add("createfanartmultiimage");

            dlgmenu.Add(GUILocalizeStrings.Get(1079849)); // create single images fanart from movie (local)
            choiceViewMenu.Add("createfanartsingleimages");

            dlgmenu.Add(GUILocalizeStrings.Get(1079853)); // create fanart from movie (local)
            choiceViewMenu.Add("createfanart");

            if (!g_Player.Stopped && g_Player.HasVideo && !string.IsNullOrEmpty(g_Player.CurrentFile))
            {
              dlgmenu.Add(GUILocalizeStrings.Get(1079852)); // Create single fanart from movie on current position (local)
              choiceViewMenu.Add("createfanartonposition");
            }

            dlgmenu.Add(GUILocalizeStrings.Get(1079862)); // Download Fanart (online)
            choiceViewMenu.Add("fanart");
          }

          dlgmenu.DoModal(GetID);
          if (dlgmenu.SelectedLabel == -1)
          {
            Change_Menu("mainmenu");
            return;
          }
          Change_Menu(choiceViewMenu[dlgmenu.SelectedLabel].ToLower());
          #endregion
          break;

        case "loadcover":
          title = GetSearchTitle(MyFilms.r, MyFilms.conf.StrIndex, "");
          mediapath = GetMediaPathOfFirstFile(MyFilms.r, MyFilms.conf.StrIndex);
          sTitles = GetSearchTitles(MyFilms.r[MyFilms.conf.StrIndex], mediapath);
          grabb_Internet_Informations(title, GetID, true, MyFilms.conf.StrGrabber_cnf, mediapath, GrabType.Cover, false, sTitles, m_SearchAnimation);
          afficher_detail(true);
          SetProcessAnimationStatus(false, m_SearchAnimation); // make sure it's switched off
          break;

        case "loadmulticover":
          title = GetSearchTitle(MyFilms.r, MyFilms.conf.StrIndex, "");
          mediapath = GetMediaPathOfFirstFile(MyFilms.r, MyFilms.conf.StrIndex);
          sTitles = GetSearchTitles(MyFilms.r[MyFilms.conf.StrIndex], mediapath);
          grabb_Internet_Informations(title, GetID, true, MyFilms.conf.StrGrabber_cnf, mediapath, GrabType.MultiCovers, false, sTitles, m_SearchAnimation);
          afficher_detail(true);
          SetProcessAnimationStatus(false, m_SearchAnimation); // make sure it's switched off
          break;

        case "tmdbposter":
          Menu_LoadTMDBposter();
          afficher_detail(true);
          break;

        default: // Main Contextmenu
          GUIUtils.ShowOKDialog("Action not yet implemented");
          return;
      }
    }
Esempio n. 2
0
 private MFMovie GetCurrentMovie()
 {
     MFMovie movie = new MFMovie
     {
       ID = ID,
       Title = Title,
       TranslatedTitle = TranslatedTitle,
       FormattedTitle = FormattedTitle,
       GroupName = GroupName,
       CategoryTrakt = CategoryTrakt,
       Edition = Edition,
       IMDBNumber = IMDBNumber,
       TMDBNumber = TMDBNumber,
       Year = Year,
       Category = Category,
       Length = Length,
       Rating = Rating,
       RatingUser = RatingUser,
       Watched = Watched,
       WatchedCount = WatchedCount,
       DateTime = DateTime,
       DateAdded = DateAdded,
       File = File,
       Trailer = Trailer,
       Path = Path,
       Picture = Picture,
       Fanart = Fanart,
       Config = Config,
       Username = Username,
       ReadOnly = ReadOnly
     };
       return movie;
 }
Esempio n. 3
0
    private static MFMovie GetMovieFromRecord(DataRow sr)
    {
      var movie = new MFMovie();
      BaseMesFilms.GetMovieDetails(sr, MyFilms.conf, false, ref movie);
      movie.Config = MyFilmsPlugin.MyFilmsGUI.Configuration.CurrentConfig;

      #region disabled old code
      //movie.ID = !string.IsNullOrEmpty(sr["Number"].ToString()) ? Int32.Parse(sr["Number"].ToString()) : 0;

      //movie.Title = sr["OriginalTitle"].ToString();

      //int year = 1900;
      //Int32.TryParse(sr["Year"].ToString(), out year);
      //movie.Year = year;

      //bool played = false;
      //if (MyFilms.conf.EnhancedWatchedStatusHandling)
      //{
      //  if (GetWatchedCount(MyFilms.conf.StrIndex, MyFilms.conf.StrUserProfileName) > 0)
      //    played = true;
      //}
      //else
      //{
      //  if (MyFilms.conf.GlobalUnwatchedOnlyValue != null && MyFilms.conf.StrWatchedField.Length > 0)
      //    if (sr[MyFilms.conf.StrWatchedField].ToString().ToLower() != MyFilms.conf.GlobalUnwatchedOnlyValue.ToLower()) // changed to take setup config into consideration
      //      played = true;
      //  //if (MyFilms.conf.StrSuppressAutomatic && MyFilms.conf.StrSuppressField.Length > 0)
      //  //  if ((sr[MyFilms.conf.StrSuppressField].ToString() == MyFilms.conf.StrSuppressValue.ToString()) && (MyFilms.conf.StrSuppressPlayStopUpdateUserField))
      //  //    played = true;
      //}
      //movie.Watched = played;

      //float rating = 0;
      //bool success = float.TryParse(sr["Rating"].ToString(), out rating);
      //if (!success) rating = 0;

      //movie.Rating = rating;
      //// movie.Rating = (float)Double.Parse(sr["Rating"].ToString());

      //// movie.RatingUser = ????;

      //string mediapath = string.Empty;
      //if (Helper.FieldIsSet(MyFilms.conf.StrStorage))
      //{
      //  mediapath = sr[MyFilms.conf.StrStorage].ToString();
      //  if (mediapath.Contains(";")) // take the first source file
      //    mediapath = mediapath.Substring(0, mediapath.IndexOf(";", System.StringComparison.Ordinal));
      //}
      //movie.File = mediapath;

      //if (string.IsNullOrEmpty(mediapath)) // e.g. offline media files
      //  movie.File = movie.Title + " {offline} [" + movie.ID + "]";

      //string currentPlayerFile = g_Player.CurrentFile;
      //if (!string.IsNullOrEmpty(currentPlayerFile))
      //  movie.File = currentPlayerFile;

      //string path = "";
      //if (!string.IsNullOrEmpty(mediapath))
      //{
      //  try
      //  {
      //    path = System.IO.Path.GetDirectoryName(mediapath);
      //  }
      //  catch (Exception)
      //  {
      //    if (!string.IsNullOrEmpty(movie.File))
      //      try
      //      {
      //        path = System.IO.Path.GetDirectoryName(movie.File);
      //      }
      //      catch (Exception)
      //      {
      //        path = "{search}";
      //      }
      //  }
      //  movie.Path = path;
      //}
      //else
      //{
      //  movie.Path = "{offline}";
      //}

      //string IMDB = "";
      //if (!string.IsNullOrEmpty(sr["IMDB_Id"].ToString()))
      //  IMDB = sr["IMDB_Id"].ToString();
      //if (!string.IsNullOrEmpty(sr["URL"].ToString()) && string.IsNullOrEmpty(IMDB))
      //{
      //  string CleanString = sr["URL"].ToString();
      //  Regex CutText = new Regex("" + @"tt\d{7}" + "");
      //  Match m = CutText.Match(CleanString);
      //  if (m.Success)
      //    IMDB = m.Value;
      //}
      //movie.IMDBNumber = IMDB;

      //if (!string.IsNullOrEmpty(sr["TMDB_Id"].ToString()))
      //  movie.TMDBNumber = sr["TMDB_Id"].ToString();
      //movie.DateAdded = sr["Date"].ToString();
      #endregion

      LogMyFilms.Info("GetMovieFromRecord(): Title = '" + movie.Title + "', year = '" + movie.Year + "', imdb = '" + movie.IMDBNumber + "', file = '" + movie.File + "', path = '" + movie.Path + "'");
      return movie;
    }
Esempio n. 4
0
    private static void SetDelayedGuiPropertiesNowPlayingTrailer(MFMovie rowPlaying)
    {
      // start a thread that will set the properties in 2 seconds (otherwise MediaPortal core logic would overwrite them)
      if (rowPlaying == null) return;
      new Thread(delegate(object o)
      {
        try
        {
          MFMovie movie = o as MFMovie;
          string pictureFile = Helper.PicturePath(MyFilms.r[MyFilms.conf.StrIndex]["Picture"].ToString(), MyFilms.conf.StrPathImg, MyFilms.conf.DefaultCover);

          Thread.Sleep(3000);
          string titleToShow = Helper.TitleWithoutGroupName(rowPlaying.TranslatedTitle) + " (" + Helper.TitleWithoutGroupName(rowPlaying.Title) + ") - " + rowPlaying.Year;
          LogMyFilms.Debug("Setting Video Properties for '{0}'", titleToShow);

          if (!string.IsNullOrEmpty(titleToShow)) GUIPropertyManager.SetProperty("#Play.Current.Title", "Trailer: " + titleToShow);
          if (!string.IsNullOrEmpty(MyFilms.r[MyFilms.conf.StrIndex]["Description"].ToString())) GUIPropertyManager.SetProperty("#Play.Current.Plot", MyFilms.r[MyFilms.conf.StrIndex]["Description"].ToString());
          if (!string.IsNullOrEmpty(MyFilms.r[MyFilms.conf.StrIndex]["Year"].ToString())) GUIPropertyManager.SetProperty("#Play.Current.Year", MyFilms.r[MyFilms.conf.StrIndex]["Year"].ToString());
          if (!string.IsNullOrEmpty(pictureFile)) GUIPropertyManager.SetProperty("#Play.Current.Thumb", pictureFile);

          Thread.Sleep(1000); // make sure, refreshrate notification is over ...
          GUIUtils.ShowNotifyDialog(GUILocalizeStrings.Get(10798986), titleToShow); // MyFilms Movie Preview
        }
        catch (Exception ex)
        {
          LogMyFilms.Warn(ex, "Error setting playing video properties: {0}", ex.Message);
        }
      }) { IsBackground = true, Name = "MyFilmsSetNowPlayingProperties" }.Start(rowPlaying);
    }
Esempio n. 5
0
 private void TraktAddRemoveMovieInUserlist(MFMovie movie, bool remove)
 {
   LogMyFilms.Debug("TraktAddRemoveMovieInUserlist(): Call with 'remove = " + remove + "' - Title = '" + movie.Title + "', year = '" + movie.Year + "', imdb = '" + movie.IMDBNumber + "', file = '" + movie.File + "', path = '" + movie.Path + "'");
   ExternalPlugins::TraktPlugin.TraktHelper.AddRemoveMovieInUserList(movie.Title, movie.Year.ToString(), movie.IMDBNumber, remove);
 }
Esempio n. 6
0
 private void TraktSearchPeople(MFMovie movie)
 {
   LogMyFilms.Debug("TraktSearchPersons(): Call with Title = '" + movie.Title + "', year = '" + movie.Year + "', imdb = '" + movie.IMDBNumber + "'");
   ExternalPlugins::TraktPlugin.GUI.SearchPeople people = new ExternalPlugins::TraktPlugin.GUI.SearchPeople();
   people.Actors.AddRange(movie.Actors);
   people.Directors.AddRange(movie.Directors);
   people.Writers.AddRange(movie.Writers);
   people.Directors.AddRange(movie.Producers);
   ExternalPlugins::TraktPlugin.GUI.GUICommon.ShowSearchByMenu(people, movie.Title, movie.Fanart);
 }
Esempio n. 7
0
 private void TraktRelatedMovies(MFMovie movie)
 {
   LogMyFilms.Debug("TraktRelatedMovies(): Call with Title = '" + movie.Title + "', year = '" + movie.Year + "', imdb = '" + movie.IMDBNumber + "'");
   ExternalPlugins::TraktPlugin.TraktHelper.ShowRelatedMovies(movie.IMDBNumber, movie.Title, movie.Year.ToString());
 }
Esempio n. 8
0
 private bool TraktInternalMenu(MFMovie movie)
 {
   bool success = false;
   try
   {
     LogMyFilms.Debug("TraktInternalMenu(): Call with Title = '" + movie.Title + "', year = '" + movie.Year + "', imdb = '" + movie.IMDBNumber + "', tmdb = '" + movie.TMDBNumber + "', actors = '" + movie.Actors.Count + "', Persons total = '" + (movie.Actors.Count + movie.Producers.Count + movie.Directors.Count + movie.Writers.Count) + "'");
     //public static bool ShowTraktExtMovieMenu(string title, string year, string imdbid, string fanart)
     //{
     //    return ShowTraktExtMovieMenu(title, year, imdbid, fanart, false);
     //}
     //public static bool ShowTraktExtMovieMenu(string title, string year, string imdbid, string fanart, bool showAll)
     //{
     //    return ShowTraktExtMovieMenu(title, year, imdbid, fanart, null, showAll);
     //}
     //public static bool ShowTraktExtMovieMenu(string title, string year, string imdbid, string fanart, SearchPeople people, bool showAll)
     
     ExternalPlugins::TraktPlugin.GUI.SearchPeople people = new ExternalPlugins::TraktPlugin.GUI.SearchPeople();
     people.Actors.AddRange(movie.Actors);
     people.Directors.AddRange(movie.Directors);
     people.Writers.AddRange(movie.Writers);
     people.Producers.AddRange(movie.Producers);
     success = ExternalPlugins::TraktPlugin.GUI.GUICommon.ShowTraktExtMovieMenu(movie.Title, movie.Year.ToString(), movie.IMDBNumber, movie.Fanart, people, true);
   }
   catch (Exception ex)
   {
     LogMyFilms.Error("TraktInternalMenu(): Error - Exception '" + ex.Message + "'");
   }
   return success;
 }
Esempio n. 9
0
 private void TraktShout(MFMovie movie)
 {
   LogMyFilms.Debug("TraktShout(): Call with Title = '" + movie.Title + "', year = '" + movie.Year + "', imdb = '" + movie.IMDBNumber + "'");
   ExternalPlugins::TraktPlugin.TraktHelper.ShowMovieShouts(movie.IMDBNumber, movie.Title, movie.Year.ToString(), movie.Fanart);
   // replaced by helper call
   //TraktPlugin.GUI.GUIShouts.ShoutType = TraktPlugin.GUI.GUIShouts.ShoutTypeEnum.movie;
   //TraktPlugin.GUI.GUIShouts.MovieInfo = new TraktPlugin.GUI.MovieShout { IMDbId = movie.IMDBNumber, TMDbId = "", Title = movie.Title, Year = movie.Year.ToString() };
   //TraktPlugin.GUI.GUIShouts.Fanart = movie.Fanart;
 }