예제 #1
0
        public static MylistItem[] MylistItem(Context Context, APIs.mylitv2.Response.Item[] Response)
        {
            if (Response == null)
            {
                return(null);
            }

            var result = new MylistItem[Response.Length];

            for (int i = 0; i < result.Length; i++)
            {
                result[i]                            = new MylistItem();
                result[i].Description                = Response[i].description;
                result[i].RegisterTime               = Response[i].addedAt;
                result[i].VideoInfo                  = Context.IDContainer.GetVideoInfo(Response[i].watchId);
                result[i].VideoInfo.Length           = TimeSpan.FromSeconds(Response[i].video.duration);
                result[i].VideoInfo.PostTime         = Response[i].video.registeredAt;
                result[i].VideoInfo.ShortDescription = Response[i].video.shortDescription;
                result[i].VideoInfo.Thumbnail        = new Picture(Response[i].video.thumbnail.url, Context.CookieContainer);
                result[i].VideoInfo.Title            = Response[i].video.title;
                result[i].VideoInfo.ComentCounter    = Response[i].video.count.comment;
                result[i].VideoInfo.MylistCounter    = Response[i].video.count.mylist;
                result[i].VideoInfo.ViewCounter      = Response[i].video.count.view;
            }

            return(result);
        }
예제 #2
0
 private NicoVideo MylistDataToNicoVideoData(MylistItem item)
 {
     return(_nicoVideoProvider.UpdateCache(item.WatchId, item.Video, item.IsDeleted));
 }