コード例 #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));
 }