static private async Task <List <Database.NicoVideo> > GetMylistFeedResult(string mylistId, Provider.MylistProvider mylistProvider)
        {
            List <Database.NicoVideo> items = new List <Database.NicoVideo>();
            int       page = 0;
            const int itemGetCountPerPage = 50;
            var       head = page * itemGetCountPerPage;
            var       tail = head + itemGetCountPerPage;
            var       res  = await mylistProvider.GetMylistGroupVideo(mylistId, (uint)head, (uint)itemGetCountPerPage);

            var videoItems        = res;
            var currentItemsCount = videoItems?.Count ?? 0;

            if (videoItems == null || currentItemsCount == 0)
            {
            }
            else
            {
                foreach (var item in videoItems)
                {
                    var video = Database.NicoVideoDb.Get(item);
                    items.Add(video);
                }
            }

            return(items);
        }
Exemple #2
0
        static private async Task <List <IVideoContent> > GetMylistFeedResult(string mylistId, Provider.MylistProvider mylistProvider)
        {
            List <IVideoContent> items    = new List <IVideoContent>();
            int       page                = 0;
            const int itemGetCountPerPage = 50;
            var       head                = page * itemGetCountPerPage;
            var       tail                = head + itemGetCountPerPage;
            var       result              = await mylistProvider.GetMylistGroupVideo(mylistId, head, itemGetCountPerPage);

            var videoItems        = result.Items;
            var currentItemsCount = videoItems?.Count ?? 0;

            if (result.IsSuccess)
            {
                items.AddRange(videoItems);
            }

            return(items);
        }