mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
26 lines
635 B
C#
26 lines
635 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace VideoLinkDownloader.Core
|
|
{
|
|
public class Video
|
|
{
|
|
public string Title { get; set; }
|
|
public long TotalSize { get; set; }
|
|
public VideoFragment[] Fragments { get; set; }
|
|
public static (bool success, IEnumerable<Video> videos) Parse(string json)
|
|
{
|
|
try
|
|
{
|
|
var videos = JsonConvert.DeserializeObject<Video[]>(json);
|
|
return (true, videos);
|
|
}
|
|
catch
|
|
{
|
|
return (false, null);
|
|
}
|
|
}
|
|
}
|
|
}
|