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