public void ToggleWatchedStatus(bool watched, bool promptForRating)
        {
            bool currentStatus = Watched;

            if (currentStatus == watched)
            {
                return;
            }

            CL_Response <CL_AnimeEpisode_User> response = VM_ShokoServer.Instance.ShokoServices.ToggleWatchedStatusOnEpisode(AnimeEpisodeID, watched,
                                                                                                                             VM_ShokoServer.Instance.CurrentUser.JMMUserID);

            if (!string.IsNullOrEmpty(response.ErrorMessage))
            {
                BaseConfig.MyAnimeLog.Write("Error in ToggleWatchedStatus: " + response.ErrorMessage);
                return;
            }

            if (promptForRating && BaseConfig.Settings.DisplayRatingDialogOnCompletion)
            {
                VM_AnimeSeries_User ser = (VM_AnimeSeries_User)VM_ShokoServer.Instance.ShokoServices.GetSeries(response.Result.AnimeSeriesID,
                                                                                                               VM_ShokoServer.Instance.CurrentUser.JMMUserID);
                if (ser != null)
                {
                    Utils.PromptToRateSeriesOnCompletion(ser);
                }
            }
        }
Exemplo n.º 2
0
 public void Populate(VM_AnimeSeries_User contract)
 {
     AnimeGroupID              = contract.AnimeGroupID;
     AniDB_ID                  = contract.AniDB_ID;
     DateTimeUpdated           = contract.DateTimeUpdated;
     DateTimeCreated           = contract.DateTimeCreated;
     DefaultAudioLanguage      = contract.DefaultAudioLanguage;
     DefaultSubtitleLanguage   = contract.DefaultSubtitleLanguage;
     EpisodeAddedDate          = contract.EpisodeAddedDate;
     LatestEpisodeAirDate      = contract.LatestEpisodeAirDate;
     LatestLocalEpisodeNumber  = contract.LatestLocalEpisodeNumber;
     SeriesNameOverride        = contract.SeriesNameOverride;
     DefaultFolder             = contract.DefaultFolder;
     MissingEpisodeCount       = contract.MissingEpisodeCount;
     MissingEpisodeCountGroups = contract.MissingEpisodeCountGroups;
     AniDBAnime                = contract.AniDBAnime;
     CrossRefAniDBTvDBV2       = contract.CrossRefAniDBTvDBV2;
     CrossRefAniDBMovieDB      = contract.CrossRefAniDBMovieDB;
     CrossRefAniDBMAL          = contract.CrossRefAniDBMAL;
     TvDB_Series               = contract.TvDB_Series;
     MovieDB_Movie             = contract.MovieDB_Movie;
 }