Esempio n. 1
0
        public void GetTvSeasons(int tvShowId, Callback callback, Errback errback = null, List<string> properties = null, Limits limits = null, Sort sort = null)
        {
            if (properties == null)
            {
                properties = new List<string> { "showtitle", "season", "fanart", "thumbnail", "episode", "playcount" };
            }

            if (limits == null)
            {
                limits = new Limits { start = 0, end = 100 };
            }

            if (sort == null)
            {
                sort = new Sort
                {
                    ignorearticle = true,
                    order = SortOrder.Ascending,
                    method = SortMethod.Year
                };
            }

            var args = new List<object> { tvShowId, properties, limits, sort };
            RpcRequest("VideoLibrary.GetSeasons", args, (data) =>
            {
                callback(data.SelectToken("result.seasons"));
            }, errback);
        }
Esempio n. 2
0
        public void GetTvShows(Callback callback, Errback errback = null, List<string> properties = null, Limits limits = null, Sort sort = null)
        {
            if (properties == null)
            {
                properties = new List<string> { "title", "genre", "thumbnail" };
            }

            if (limits == null)
            {
                limits = new Limits { start = 0, end = 100 };
            }

            if (sort == null)
            {
                sort = new Sort
                {
                    ignorearticle = true,
                    order = SortOrder.Ascending,
                    method = SortMethod.Title
                };
            }

            var args = new List<object> { properties, limits, sort };
            RpcRequest("VideoLibrary.GetTVShows", args, (data) =>
            {
                callback(data.SelectToken("result.tvshows"));
            }, errback);
        }
Esempio n. 3
0
        public void GetRecentlyAddedEpisodes(Callback callback, Errback errback = null, List<string> properties = null, Limits limits = null, Sort sort = null)
        {
            if (properties == null)
            {
                properties = new List<string> { "title", "showtitle", "fanart", "thumbnail", "firstaired" };
            }

            if (limits == null)
            {
                limits = new Limits { start = 0, end = 100 };
            }

            if (sort == null)
            {
                sort = new Sort
                {
                    ignorearticle = true,
                    order = SortOrder.Descending,
                    method = SortMethod.Date
                };
            }

            var args = new List<object> { properties, limits, sort };
            RpcRequest("VideoLibrary.GetRecentlyAddedEpisodes", args, (data) =>
            {
                callback(data.SelectToken("result.episodes"));
            }, errback);
        }