public List <Episode> GetEpisodes(int?tvShowId, int?season, string[] fields, SortParams sort) { var args = new JObject(); if (tvShowId != null) { args.Add(new JProperty("tvshowid", tvShowId)); } if (season != null) { args.Add(new JProperty("season", season)); } if (fields != null) { args.Add(new JProperty("fields", fields)); } if (sort != null) { args.Add(sort.ToJObject().Children()); } List <Episode> list = new List <Episode>(); JObject query = (JObject)Client.Invoke("VideoLibrary.GetEpisodes", args); if (query["episodes"] != null) { foreach (JObject item in (JArray)query["episodes"]) { list.Add(Episode.EpisodeFromJsonObject(item)); } } return(list); }
public List <TvShow> GetTvShows(string[] fields, SortParams sort) { var args = new JObject(); if (fields != null) { args.Add(new JProperty("fields", fields)); } if (sort != null) { args.Add(sort.ToJObject().Children()); } List <TvShow> list = new List <TvShow>(); JObject query = (JObject)Client.Invoke("VideoLibrary.GetTvShows", args); if (query["tvshows"] != null) { foreach (JObject item in (JArray)query["tvshows"]) { list.Add(TvShow.TvShowFromJsonObject(item)); } } return(list); }
public List <Album> GetAlbums(string[] fields, SortParams sort) { var args = new JObject(); if (fields != null) { args.Add(new JProperty("fields", fields)); } if (sort != null) { args.Add(sort.ToJObject().Children()); } JObject query = (JObject)Client.Invoke("AudioLibrary.GetAlbums", args); List <Album> list = new List <Album>(); if (query != null) { foreach (JObject item in (JArray)query["albums"]) { list.Add(Album.AlbumFromJsonObject(item)); } } return(list); }
public List <MusicVideo> GetRecentlyAddedMusicVideos(string[] fields, SortParams sort) { var args = new JObject(); if (fields != null) { args.Add(new JProperty("fields", fields)); } if (sort != null) { args.Add(sort.ToJObject().Children()); } List <MusicVideo> list = new List <MusicVideo>(); JObject query = (JObject)Client.Invoke("VideoLibrary.GetRecentlyAddedMusicVideos", args); if (query["musicvideos"] != null) { foreach (JObject item in (JArray)query["musicvideos"]) { list.Add(MusicVideo.MusicVideoFromJsonObject(item)); } } return(list); }
public List <Song> GetSongsByAlbum(int?albumId, string[] fields, SortParams sort) { var args = new JObject(); if (albumId != null) { args.Add(new JProperty("albumid", albumId)); } if (fields != null) { args.Add(new JProperty("fields", fields)); } if (sort != null) { args.Add(sort.ToJObject().Children()); } JObject query = (JObject)Client.Invoke("AudioLibrary.GetSongs", args); List <Song> list = new List <Song>(); if (query != null) { foreach (JObject item in (JArray)query["songs"]) { list.Add(Song.SongFromJsonObject(item)); } } return(list); }
public List <Artist> GetArtists(SortParams sort) { var args = new JObject(); if (sort != null) { args.Add(sort.ToJObject().Children()); } JObject query = (JObject)Client.Invoke("AudioLibrary.GetArtists", args); List <Artist> list = new List <Artist>(); if (query != null) { foreach (JObject item in (JArray)query["artists"]) { list.Add(Artist.ArtistFromJsonObject(item)); } } return(list); }
public List <Song> GetSongsByGenreAndArtistAllFields(string genre, int artistId, SortParams sort) { return(GetSongsByGenreAndArtist(genre, artistId, AllSongFields, sort)); }
public List <Song> GetSongsByArtistAllFields(int artistId, SortParams sort) { return(GetSongsByArtist(artistId, AllSongFields, sort)); }
public List <Song> GetSongsByGenreAllFields(string genre, SortParams sort) { return(GetSongsByGenre(genre, AllSongFields, sort)); }
public List <Song> GetSongsAllFields(SortParams sort) { return(GetSongs(AllSongFields, sort)); }
public List <Album> GetAlbumsByGenreAndArtistAllFields(string genre, int artistId, SortParams sort) { return(GetAlbumsByGenreAndArtist(genre, artistId, AllAlbumFields, sort)); }
public List <Episode> GetEpisodesAllFields(int tvShowId, int season, SortParams sort) { return(GetEpisodes(tvShowId, season, AllEpisodeFields, sort)); }
public List <Album> GetAlbumsAllFields(SortParams sort) { return(GetAlbums(AllAlbumFields, sort)); }
public List <TvShow> GetTvShowsAllFields(SortParams sort) { return(GetTvShows(AllTvShowFields, sort)); }
public List <MusicVideo> GetRecentlyAddedMusicVideosAllFields(SortParams sort) { return(GetRecentlyAddedMusicVideos(AllMusicVideoFields, sort)); }
public List <Episode> GetRecentlyAddedEpisodesAllFields(SortParams sort) { return(GetRecentlyAddedEpisodes(AllEpisodeFields, sort)); }
public List <Movie> GetMoviesAllFields(SortParams sort) { return(GetMovies(AllMovieFields, sort)); }
public List <Movie> GetRecentlyAddedMoviesAllFields(SortParams sort) { return(GetRecentlyAddedMovies(AllMovieFields, sort)); }
public List <Song> GetSongsByArtistAndAlbumAllFields(int artistId, int albumId, SortParams sort) { return(GetSongsByArtistAndAlbum(artistId, albumId, AllSongFields, sort)); }
public List <Album> GetAlbumsByGenreAllFields(string genre, SortParams sort) { return(GetAlbumsByGenre(genre, AllAlbumFields, sort)); }
public List <Album> GetAlbumsByArtistAllFields(int artistId, SortParams sort) { return(GetAlbumsByArtist(artistId, AllAlbumFields, sort)); }
public List <Season> GetSeasonsAllFields(int tvShowId, SortParams sort) { return(GetSeasons(tvShowId, AllSeasonFields, sort)); }