Пример #1
0
 public bool CancelWatchingEpisode(WebTVEpisodeDetailed episode)
 {
     TraktResponse response = TraktAPI.ScrobbleEpisodeState(null, TraktScrobbleState.cancelwatching);
     if (response.Status != "success")
     {
         Log.Warn("Trakt: failed to cancel watching episode: {0}", response.Error);
         return false;
     }
     else
     {
         return true;
     }
 }
Пример #2
0
 public bool CancelWatchingEpisode(WebTVShowDetailed show, WebTVSeasonDetailed season, WebTVEpisodeDetailed episode)
 {
     Log.Debug("WSD: Canceled episode {0}", episode.Title);
     return true;
 }
Пример #3
0
 public bool WatchingEpisode(WebTVShowDetailed show, WebTVSeasonDetailed season, WebTVEpisodeDetailed episode, int progress)
 {
     Log.Debug("WSD: Watching episode {0} ({1}%)", episode.Title, progress);
     return true;
 }
Пример #4
0
 public bool FinishEpisode(WebTVEpisodeDetailed episode)
 {
     Log.Debug("WSD: Finished episode {0}", episode.Title);
     return true;
 }
Пример #5
0
 public bool StartWatchingEpisode(WebTVEpisodeDetailed episode)
 {
     return CallFollwitEpisode(episode, FollwitWatchStatus.Watching);
 }
Пример #6
0
 public bool FinishEpisode(WebTVEpisodeDetailed episode)
 {
     return CallShowAPI(episode, TraktWatchStatus.Scrobble, 100);
 }
Пример #7
0
 public bool WatchingEpisode(WebTVEpisodeDetailed episode, int progress)
 {
     return CallShowAPI(episode, TraktWatchStatus.Watching, progress);
 }
Пример #8
0
 public TVEpisodeViewModel(WebTVShowDetailed show, WebTVSeasonDetailed season, WebTVEpisodeDetailed episode)
 {
     Episode = episode;
     _show = show;
     _season = season;
 }
Пример #9
0
 public bool FinishEpisode(WebTVShowDetailed show, WebTVSeasonDetailed season, WebTVEpisodeDetailed episode)
 {
     return CallShowAPI(show, season, episode, TraktWatchStatus.Scrobble, 100);
 }
Пример #10
0
 public bool WatchingEpisode(WebTVShowDetailed show, WebTVSeasonDetailed season, WebTVEpisodeDetailed episode, int progress)
 {
     return CallShowAPI(show, season, episode, TraktWatchStatus.Watching, progress);
 }
Пример #11
0
 public bool FinishEpisode(WebTVEpisodeDetailed episode)
 {
     return CallShowAPI(episode, TraktScrobbleState.scrobble, 100);
 }
Пример #12
0
 public bool WatchingEpisode(WebTVEpisodeDetailed episode, int progress)
 {
     return CallShowAPI(episode, TraktScrobbleState.watching, progress);
 }
Пример #13
0
 public bool StartWatchingEpisode(WebTVEpisodeDetailed episode)
 {
     return true;
 }
Пример #14
0
 public TVEpisodeViewModel(WebTVEpisodeDetailed episode)
 {
     Episode = episode;
     Season = Connections.Current.MAS.GetTVSeasonDetailedById(Episode.PID, Episode.SeasonId);
     Show = Connections.Current.MAS.GetTVShowDetailedById(Episode.PID, Episode.ShowId);
 }
Пример #15
0
 public bool FinishEpisode(WebTVShowDetailed show, WebTVSeasonDetailed season, WebTVEpisodeDetailed episode)
 {
     Log.Debug("WSD: Finished episode {0}", episode.Title);
     return true;
 }
Пример #16
0
 public bool StartWatchingEpisode(WebTVShowDetailed show, WebTVSeasonDetailed season, WebTVEpisodeDetailed episode)
 {
     return CallShowAPI(show, season, episode, TraktWatchStatus.Watching, 0);
 }
Пример #17
0
 public bool StartWatchingEpisode(WebTVShowDetailed show, WebTVSeasonDetailed season, WebTVEpisodeDetailed episode)
 {
     Log.Debug("WSD: Start watching episode {0}, season {1}, show {2}", episode.Title, episode.SeasonId, episode.ShowId);
     return true;
 }
Пример #18
0
        private bool CallFollwitEpisode(WebTVEpisodeDetailed episode, FollwitWatchStatus state)
        {
            try
            {
                if (episode.ExternalId.Count(x => x.Site == "TVDB") == 0)
                {
                    Log.Info("Follwit: TVDB id of episode {0} unknown, not sending", episode.Title);
                    return false;
                }

                var fm = new FollwitEpisode()
                {
                    Username = Configuration["username"],
                    Password = Configuration["passwordHash"],
                    TVDBId = episode.ExternalId.First(x => x.Site == "TVDB").Id
                };

                var ret = FollwitAPI.UpdateEpisodeState(fm, state);
                if (ret.Response != "success")
                {
                    Log.Warn("Follwit: failed to update watch status of episode '{0}' ({1})", episode.Title, episode.Id);
                    return false;
                }
            }
            catch (Exception ex)
            {
                Log.Warn("Follwit: failed to update episode watch status", ex);
                return false;
            }
            return true;
        }
Пример #19
0
 public TVEpisodeViewModel(WebTVEpisodeDetailed episode)
 {
     Episode = episode;
 }
Пример #20
0
 public bool StartWatchingEpisode(WebTVShowDetailed show, WebTVSeasonDetailed season, WebTVEpisodeDetailed episode)
 {
     return CallFollwitEpisode(episode, FollwitWatchStatus.Watching);
 }
Пример #21
0
 public bool CancelWatchingEpisode(WebTVEpisodeDetailed episode)
 {
     return CallShowAPI(episode, TraktWatchStatus.CancelWatching, null);
 }
Пример #22
0
 public bool WatchingEpisode(WebTVShowDetailed show, WebTVSeasonDetailed season, WebTVEpisodeDetailed episode, int progress)
 {
     // Follw.it doesn't require to send a status each X minutes or something
     return true;
 }
Пример #23
0
 public bool StartWatchingEpisode(WebTVEpisodeDetailed episode)
 {
     return CallShowAPI(episode, TraktWatchStatus.Watching, 0);
 }
Пример #24
0
 public bool FinishEpisode(WebTVEpisodeDetailed episode)
 {
     return CallFollwitEpisode(episode, FollwitWatchStatus.Watched);
 }