Example #1
0
        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);
        }
Example #2
0
        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);
        }
Example #3
0
        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);
        }
Example #4
0
        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);
        }
Example #5
0
        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);
        }
Example #6
0
        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);
        }
Example #7
0
 public List <Song> GetSongsByGenreAndArtistAllFields(string genre, int artistId, SortParams sort)
 {
     return(GetSongsByGenreAndArtist(genre, artistId, AllSongFields, sort));
 }
Example #8
0
 public List <Song> GetSongsByArtistAllFields(int artistId, SortParams sort)
 {
     return(GetSongsByArtist(artistId, AllSongFields, sort));
 }
Example #9
0
 public List <Song> GetSongsByGenreAllFields(string genre, SortParams sort)
 {
     return(GetSongsByGenre(genre, AllSongFields, sort));
 }
Example #10
0
 public List <Song> GetSongsAllFields(SortParams sort)
 {
     return(GetSongs(AllSongFields, sort));
 }
Example #11
0
 public List <Album> GetAlbumsByGenreAndArtistAllFields(string genre, int artistId, SortParams sort)
 {
     return(GetAlbumsByGenreAndArtist(genre, artistId, AllAlbumFields, sort));
 }
Example #12
0
 public List <Episode> GetEpisodesAllFields(int tvShowId, int season, SortParams sort)
 {
     return(GetEpisodes(tvShowId, season, AllEpisodeFields, sort));
 }
Example #13
0
 public List <Album> GetAlbumsAllFields(SortParams sort)
 {
     return(GetAlbums(AllAlbumFields, sort));
 }
Example #14
0
 public List <TvShow> GetTvShowsAllFields(SortParams sort)
 {
     return(GetTvShows(AllTvShowFields, sort));
 }
Example #15
0
 public List <MusicVideo> GetRecentlyAddedMusicVideosAllFields(SortParams sort)
 {
     return(GetRecentlyAddedMusicVideos(AllMusicVideoFields, sort));
 }
Example #16
0
 public List <Episode> GetRecentlyAddedEpisodesAllFields(SortParams sort)
 {
     return(GetRecentlyAddedEpisodes(AllEpisodeFields, sort));
 }
Example #17
0
 public List <Movie> GetMoviesAllFields(SortParams sort)
 {
     return(GetMovies(AllMovieFields, sort));
 }
Example #18
0
 public List <Movie> GetRecentlyAddedMoviesAllFields(SortParams sort)
 {
     return(GetRecentlyAddedMovies(AllMovieFields, sort));
 }
Example #19
0
 public List <Song> GetSongsByArtistAndAlbumAllFields(int artistId, int albumId, SortParams sort)
 {
     return(GetSongsByArtistAndAlbum(artistId, albumId, AllSongFields, sort));
 }
Example #20
0
 public List <Album> GetAlbumsByGenreAllFields(string genre, SortParams sort)
 {
     return(GetAlbumsByGenre(genre, AllAlbumFields, sort));
 }
Example #21
0
 public List <Album> GetAlbumsByArtistAllFields(int artistId, SortParams sort)
 {
     return(GetAlbumsByArtist(artistId, AllAlbumFields, sort));
 }
Example #22
0
 public List <Season> GetSeasonsAllFields(int tvShowId, SortParams sort)
 {
     return(GetSeasons(tvShowId, AllSeasonFields, sort));
 }