Beispiel #1
0
 public int CompareTo(VideoLocalVM obj)
 {
     return(FullPath.CompareTo(obj.FullPath));
 }
Beispiel #2
0
 public int CompareTo(VideoLocalVM obj)
 {
     return FullPath.CompareTo(obj.FullPath);
 }
Beispiel #3
0
        public bool ResumeOrPlay(VideoLocalVM fileToPlay)
        {
            try
            {
                curEpisode = null;

                int timeMovieStopped = 0;
                if (!File.Exists(fileToPlay.FullPath))
                {
                    Utils.DialogMsg("Error", "File could not be found!");
                    return false;
                }

                BaseConfig.MyAnimeLog.Write("Getting time stopped for : {0}", fileToPlay.FullPath);
                timeMovieStopped = GetTimeStopped(fileToPlay.FullPath);
                BaseConfig.MyAnimeLog.Write("Time stopped for : {0} - {1}", fileToPlay.FullPath, timeMovieStopped);

                curFileName = fileToPlay.FullPath;

                #region Ask user to Resume
                if (timeMovieStopped > 0)
                {
                    GUIDialogYesNo dlgYesNo = (GUIDialogYesNo)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_YES_NO);

                    if (null != dlgYesNo)
                    {
                        dlgYesNo.SetHeading(GUILocalizeStrings.Get(900)); //resume movie?
                        dlgYesNo.SetLine(1, fileToPlay.FileName);
                        dlgYesNo.SetLine(2, GUILocalizeStrings.Get(936) + " " + MediaPortal.Util.Utils.SecondsToHMSString(timeMovieStopped));
                        dlgYesNo.SetDefaultToYes(true);
                        dlgYesNo.DoModal(GUIWindowManager.ActiveWindow);
                        if (!dlgYesNo.IsConfirmed) // reset resume data in DB
                        {
                            timeMovieStopped = 0;
                        }
                    }
                }
                #endregion

                Play(timeMovieStopped, fileToPlay.DefaultAudioLanguage, fileToPlay.DefaultSubtitleLanguage);
                return true;
            }
            catch (Exception ex)
            {
                BaseConfig.MyAnimeLog.Write("Error inResumeOrPlay : {0}", ex.ToString());
            }
            return false;
        }