示例#1
0
        public async Task <IAsyncEnumerable <MylistPlaylist> > GetPagedItems(int head, int count)
        {
            var result = await SearchProvider.MylistSearchAsync(
                SearchOption.Keyword
                , (uint)head
                , (uint)count
                , SearchOption.Sort
                , SearchOption.Order
                );

            return(result.IsSuccess ? result.Items.ToAsyncEnumerable() : AsyncEnumerable.Empty <MylistPlaylist>());
        }
示例#2
0
        public async Task <int> ResetSource()
        {
            // Note: 件数が1だとJsonのParseがエラーになる
            _MylistGroupResponse = await SearchProvider.MylistSearchAsync(
                SearchOption.Keyword,
                0,
                2,
                SearchOption.Sort,
                SearchOption.Order
                );

            return((int)_MylistGroupResponse.GetTotalCount());
        }
示例#3
0
        public async Task <int> ResetSource()
        {
            // Note: 件数が1だとJsonのParseがエラーになる
            var res = await SearchProvider.MylistSearchAsync(
                SearchOption.Keyword,
                0,
                2,
                SearchOption.Sort,
                SearchOption.Order
                );

            return(res.TotalCount);
        }
示例#4
0
        public async Task <IAsyncEnumerable <Interfaces.IMylist> > GetPagedItems(int head, int count)
        {
            var response = await SearchProvider.MylistSearchAsync(
                SearchOption.Keyword
                , (uint)head
                , (uint)count
                , SearchOption.Sort
                , SearchOption.Order
                );

            return(response.MylistGroupItems?
                   .Select(item => new OtherOwneredMylist(item.VideoInfoItems.Select(x => x.Video.Id).ToList() ?? Enumerable.Empty <string>().ToList())
            {
                Label = item.Name,
                Description = item.Description,
                ItemCount = (int)item.ItemCount,
            } as Interfaces.IMylist)
                   .ToAsyncEnumerable()
                   ?? AsyncEnumerable.Empty <Interfaces.IMylist>());
        }