private TraktShowSync GetSyncShowsData(List<TMDbShow> shows) { var traktShows = new List<TraktShowSync.Show>(); traktShows.AddRange(from show in shows select new TraktShowSync.Show { Title = show.Title, Year = show.ReleaseDate.Substring(0,4) }); var showSyncData = new TraktShowSync { Username = AppSettings.TraktUsername, Password = AppSettings.TraktPassword, Showlist = traktShows }; return showSyncData; }
public static TraktResponse SyncShowLibrary(TraktShowSync syncData, TraktSyncModes mode) { // check that we have everything we need if (syncData == null) return null; // serialize data to JSON and send to server string response = TraktWeb.Transmit(string.Format(TraktURIs.SyncShowLibrary, mode.ToString()), syncData.ToJSON()); // return success or failure return response.FromJSON<TraktResponse>(); }
public static TraktShowSync GetSyncShowsData(IEnumerable<Dictionary<string, string>> shows) { var traktShows = new List<TraktShowSync.Show>(); traktShows.AddRange(from show in shows select new TraktShowSync.Show { IMDbId = show[IMDbFieldMapping.cIMDbID], Title = show[IMDbFieldMapping.cTitle], Year = show[IMDbFieldMapping.cYear] }); var traktShowsData = new TraktShowSync { Username = AppSettings.TraktUsername, Password = AppSettings.TraktPassword, Showlist = traktShows }; return traktShowsData; }
private TraktShowSync GetSyncShowsData(List<ListalExport.RSSChannel.Item> shows) { var traktShows = new List<TraktShowSync.Show>(); traktShows.AddRange(from show in shows select new TraktShowSync.Show { Title = show.Title, IMDbId = "tt" + show.IMDbId }); var showWatchedData = new TraktShowSync { Username = AppSettings.TraktUsername, Password = AppSettings.TraktPassword, Showlist = traktShows }; return showWatchedData; }