mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Add bundle builder, remove vld-windows
This commit is contained in:
parent
73c6b7981f
commit
5776f834a8
@ -1,6 +1,6 @@
|
||||
// ==UserScript==
|
||||
// @name Bilibili Evolved (Offline)
|
||||
// @version 413.12
|
||||
// @version 413.28
|
||||
// @description Bilibili Evolved 的离线版, 所有功能都已内置于脚本中.
|
||||
// @author Grant Howard, Coulomb-G
|
||||
// @copyright 2019, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// ==UserScript==
|
||||
// @name Bilibili Evolved (Preview Offline)
|
||||
// @version 413.12
|
||||
// @version 413.28
|
||||
// @description Bilibili Evolved 的预览离线版, 可以抢先体验新功能, 并且所有功能都已内置于脚本中.
|
||||
// @author Grant Howard, Coulomb-G
|
||||
// @copyright 2019, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -4,7 +4,10 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Security.Cryptography;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Newtonsoft.Json;
|
||||
using System.IO.Compression;
|
||||
|
||||
namespace BilibiliEvolved.Build
|
||||
{
|
||||
@ -12,14 +15,23 @@ namespace BilibiliEvolved.Build
|
||||
{
|
||||
public ProjectBuilder BuildBundle()
|
||||
{
|
||||
// var urlList = from file in Directory.GetFiles("min")
|
||||
// where !file.Contains("dark-slice")
|
||||
// select file.Replace(@"\", "/");
|
||||
// var hashDict = new Dictionary<string, string>();
|
||||
// foreach (var url in urlList)
|
||||
// {
|
||||
|
||||
// }
|
||||
var urlList = from file in Directory.GetFiles("min")
|
||||
where !file.Contains("dark-slice")
|
||||
select file.Replace(@"\", "/");
|
||||
var hashDict = new Dictionary<string, string>();
|
||||
using (var sha1 = new SHA1Managed())
|
||||
using (var zip = ZipFile.Open("min/bundle.zip", ZipArchiveMode.Update))
|
||||
{
|
||||
foreach (var url in urlList)
|
||||
{
|
||||
var filename = Path.GetFileName(url);
|
||||
var hash = string.Join("", sha1.ComputeHash(File.OpenRead(url)).Select(b => b.ToString("X2")).ToArray());
|
||||
zip.CreateEntryFromFile(url, filename);
|
||||
hashDict.Add(filename, hash);
|
||||
}
|
||||
}
|
||||
File.WriteAllText("min/bundle.json", JsonConvert.SerializeObject(hashDict, Formatting.Indented));
|
||||
WriteSuccess("Bundle build complete.");
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
@ -1,25 +0,0 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,134 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
|
||||
namespace VideoLinkDownloader.Core
|
||||
{
|
||||
public enum VideoDownloadResult
|
||||
{
|
||||
Success,
|
||||
Skipped,
|
||||
Failed,
|
||||
}
|
||||
public class VideoDownloader
|
||||
{
|
||||
public Video Video { get; private set; }
|
||||
public VideoDownloaderConfig Config { get; set; } = VideoDownloaderConfig.Default;
|
||||
public List<Action<double>> ProgressUpdate { get; } = new List<Action<double>>();
|
||||
public long DownloadedBytes
|
||||
{
|
||||
get
|
||||
{
|
||||
var entires = taskMap.ToArray();
|
||||
return entires.Select(it => it.Value).Sum();
|
||||
}
|
||||
}
|
||||
public double Progress => (double)DownloadedBytes / Video.TotalSize;
|
||||
public bool Downloading { get; private set; } = false;
|
||||
public VideoDownloader(Video video)
|
||||
{
|
||||
Video = video;
|
||||
}
|
||||
public async Task<IEnumerable<VideoDownloadResult>> Download()
|
||||
{
|
||||
taskMap = new Dictionary<Task, long>();
|
||||
var results = await Task.WhenAll(from fragment in Video.Fragments select downloadFragment(fragment));
|
||||
await Task.WhenAll(from fragment in Video.Fragments select mergeParts(fragment));
|
||||
return results;
|
||||
}
|
||||
private string getTitle(VideoFragment fragment)
|
||||
{
|
||||
return Video.Fragments.Length == 1 ? Video.Title : $"{Video.Title} - {Array.IndexOf(Video.Fragments, fragment) + 1}";
|
||||
}
|
||||
private Dictionary<Task, long> taskMap = new Dictionary<Task, long>();
|
||||
private void updateProgress()
|
||||
{
|
||||
ProgressUpdate.ForEach(it => it(Progress));
|
||||
}
|
||||
private async Task<VideoDownloadResult> downloadFragment(VideoFragment fragment)
|
||||
{
|
||||
var partialLength = fragment.Size / Config.Parts + 1;
|
||||
var title = getTitle(fragment);
|
||||
var filename = title + fragment.Extension;
|
||||
if (File.Exists(filename))
|
||||
{
|
||||
return VideoDownloadResult.Skipped;
|
||||
}
|
||||
var startByte = 0;
|
||||
var part = 0;
|
||||
while (startByte < fragment.Size)
|
||||
{
|
||||
var partFilename = $"{title}.part{part}";
|
||||
if (!File.Exists(partFilename))
|
||||
{
|
||||
var endByte = Math.Min(fragment.Size, startByte + partialLength) - 1;
|
||||
var range = $"bytes={startByte}-{endByte}";
|
||||
var client = new HttpClient();
|
||||
client.DefaultRequestHeaders.Range = new RangeHeaderValue(startByte, endByte);
|
||||
client.DefaultRequestHeaders.Referrer = new Uri("https://www.bilibili.com", UriKind.Absolute);
|
||||
client.DefaultRequestHeaders.Add("Origin", "https://www.bilibili.com");
|
||||
client.DefaultRequestHeaders.Add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36");
|
||||
//client.Headers[HttpRequestHeader.Range] = range;
|
||||
//client.Headers[HttpRequestHeader.Referer] = "https://www.bilibili.com";
|
||||
//client.Headers[HttpRequestHeader.UserAgent] = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36";
|
||||
//client.Headers["Origin"] = "https://www.bilibili.com";
|
||||
Task task = null;
|
||||
try
|
||||
{
|
||||
task = Task.Run(async () =>
|
||||
{
|
||||
using (var response = await client.GetStreamAsync(fragment.Url))
|
||||
using (var file = File.OpenWrite(partFilename))
|
||||
{
|
||||
while (response.CanRead)
|
||||
{
|
||||
file.WriteByte((byte)response.ReadByte());
|
||||
taskMap[task]++;
|
||||
updateProgress();
|
||||
}
|
||||
}
|
||||
});
|
||||
//task = client.DownloadFileTaskAsync(fragment.Url, partFilename);
|
||||
//client.DownloadProgressChanged += (s, e) =>
|
||||
//{
|
||||
// taskMap[task] = e.BytesReceived;
|
||||
//};
|
||||
taskMap.Add(task, 0L);
|
||||
}
|
||||
catch (Exception ex)
|
||||
when (ex is WebException || ex is InvalidOperationException)
|
||||
{
|
||||
// TODO: handle web errors
|
||||
return VideoDownloadResult.Failed;
|
||||
}
|
||||
}
|
||||
part++;
|
||||
startByte = startByte + partialLength;
|
||||
}
|
||||
Downloading = true;
|
||||
await Task.WhenAll(taskMap.Select(it => it.Key));
|
||||
Downloading = false;
|
||||
return VideoDownloadResult.Success;
|
||||
}
|
||||
private async Task mergeParts(VideoFragment fragment)
|
||||
{
|
||||
var title = getTitle(fragment);
|
||||
using (var writeStream = File.OpenWrite($"{title}.{fragment.Extension}"))
|
||||
{
|
||||
for (var part = 0; part < Config.Parts; part++)
|
||||
{
|
||||
using (var readStream = File.OpenRead($"{title}.part{part}"))
|
||||
{
|
||||
await readStream.CopyToAsync(writeStream);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,20 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace VideoLinkDownloader.Core
|
||||
{
|
||||
public class VideoDownloaderConfig
|
||||
{
|
||||
public bool Danmaku { get; set; }
|
||||
public int Parts { get; set; }
|
||||
public string OutputFolder { get; set; }
|
||||
|
||||
public static VideoDownloaderConfig Default { get; } = new VideoDownloaderConfig
|
||||
{
|
||||
Danmaku = false,
|
||||
Parts = 12,
|
||||
OutputFolder = ".",
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -1,15 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace VideoLinkDownloader.Core
|
||||
{
|
||||
public class VideoFragment
|
||||
{
|
||||
public int Length { get; set; }
|
||||
public int Size { get; set; }
|
||||
public string Url { get; set; }
|
||||
public string[] BackupUrls { get; set; }
|
||||
public string Extension => Url.Contains(".flv") ? ".flv" : ".mp4";
|
||||
}
|
||||
}
|
||||
@ -1,11 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@ -1,31 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.28307.489
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VideoLinkDownloader", "VideoLinkDownloader\VideoLinkDownloader.csproj", "{B520B1C6-5C3A-403B-8B78-43386D11ECBE}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VideoLinkDownloader.Core", "VideoLinkDownloader.Core\VideoLinkDownloader.Core.csproj", "{F60E759E-6551-426F-A08B-5CFC68D0CAF5}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{B520B1C6-5C3A-403B-8B78-43386D11ECBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B520B1C6-5C3A-403B-8B78-43386D11ECBE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B520B1C6-5C3A-403B-8B78-43386D11ECBE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B520B1C6-5C3A-403B-8B78-43386D11ECBE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F60E759E-6551-426F-A08B-5CFC68D0CAF5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F60E759E-6551-426F-A08B-5CFC68D0CAF5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F60E759E-6551-426F-A08B-5CFC68D0CAF5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F60E759E-6551-426F-A08B-5CFC68D0CAF5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {82B7FF79-FD03-4738-B53C-FDFAFA7D6358}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@ -1,69 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Interop;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace VideoLinkDownloader
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct AccentPolicy
|
||||
{
|
||||
public AccentState AccentState;
|
||||
public int AccentFlags;
|
||||
public int GradientColor;
|
||||
public int AnimationId;
|
||||
}
|
||||
enum AccentState
|
||||
{
|
||||
Diabled = 0,
|
||||
Gradient = 1,
|
||||
TransparentGradient = 2,
|
||||
BlurBehind = 3,
|
||||
AcrylicBlurBehind = 4,
|
||||
InvalidState = 5,
|
||||
}
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct WindowsCompostionAttributeData
|
||||
{
|
||||
public int Attribute;
|
||||
public IntPtr Data;
|
||||
public int SizeOfData;
|
||||
}
|
||||
static class AcrylicBlur
|
||||
{
|
||||
[DllImport("user32.dll")]
|
||||
private static extern int SetWindowCompositionAttribute(IntPtr hWnd, ref WindowsCompostionAttributeData data);
|
||||
public static void Apply(Window window, Color backgroundColor, AccentState state = AccentState.AcrylicBlurBehind)
|
||||
{
|
||||
int getColorCode(Color color)
|
||||
{
|
||||
return color.A << 24 | // DWM uses ABGR format
|
||||
color.B << 16 |
|
||||
color.G << 8 |
|
||||
color.R;
|
||||
}
|
||||
|
||||
var helper = new WindowInteropHelper(window);
|
||||
var accent = new AccentPolicy();
|
||||
var accentSize = Marshal.SizeOf(accent);
|
||||
accent.AccentState = state;
|
||||
accent.GradientColor = getColorCode(backgroundColor);
|
||||
var accentPointer = Marshal.AllocHGlobal(accentSize);
|
||||
Marshal.StructureToPtr(accent, accentPointer, false);
|
||||
var data = new WindowsCompostionAttributeData
|
||||
{
|
||||
Attribute = 19, //WindowCompositionAttribute.AccentPolicy
|
||||
SizeOfData = accentSize,
|
||||
Data = accentPointer,
|
||||
};
|
||||
|
||||
SetWindowCompositionAttribute(helper.Handle, ref data);
|
||||
Marshal.FreeHGlobal(accentPointer);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
</startup>
|
||||
</configuration>
|
||||
@ -1,18 +0,0 @@
|
||||
<Application
|
||||
x:Class="VideoLinkDownloader.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:VideoLinkDownloader"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary
|
||||
Source="Theme.Dark.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<SolidColorBrush
|
||||
x:Key="ThemeColor"
|
||||
Color="#26a69a" />
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
@ -1,32 +0,0 @@
|
||||
using Microsoft.Win32;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
namespace VideoLinkDownloader
|
||||
{
|
||||
public partial class App : Application
|
||||
{
|
||||
protected override void OnStartup(StartupEventArgs e)
|
||||
{
|
||||
base.OnStartup(e);
|
||||
var registry = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Themes\Personalize");
|
||||
// if (registry is null || (int) registry.GetValue("AppsUseLightTheme", 0) == 1)
|
||||
if (true)
|
||||
{
|
||||
Resources.MergedDictionaries.Remove(new ResourceDictionary
|
||||
{
|
||||
Source = new Uri("Theme.Dark.xaml", UriKind.Relative),
|
||||
});
|
||||
Resources.MergedDictionaries.Add(new ResourceDictionary
|
||||
{
|
||||
Source = new Uri("Theme.Light.xaml", UriKind.Relative),
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 MiB |
@ -1,32 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VideoLinkDownloader
|
||||
{
|
||||
static class Extensions
|
||||
{
|
||||
public static string ToFileSize(this long size)
|
||||
{
|
||||
string[] units = { "B", "KB", "MB", "GB", "TB", "PB", "EB" };
|
||||
if (size == 0)
|
||||
{
|
||||
return "0" + units[0];
|
||||
}
|
||||
|
||||
var bytes = Math.Abs(size);
|
||||
var place = Convert.ToInt32(Math.Floor(Math.Log(bytes, 1024)));
|
||||
var num = Math.Round(bytes / Math.Pow(1024, place), 1);
|
||||
return (Math.Sign(size) * num).ToString() + units[place];
|
||||
}
|
||||
public static void ForEach<T>(this IEnumerable<T> collection, Action<T> action)
|
||||
{
|
||||
foreach (var item in collection)
|
||||
{
|
||||
action(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,27 +0,0 @@
|
||||
<Window
|
||||
x:Class="VideoLinkDownloader.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:VideoLinkDownloader"
|
||||
mc:Ignorable="d"
|
||||
Background="{DynamicResource Background}"
|
||||
Foreground="{DynamicResource Foreground}"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
Title="Bilibili Evolved Video Link Downloader"
|
||||
Height="800"
|
||||
Width="600">
|
||||
<WindowChrome.WindowChrome>
|
||||
<WindowChrome
|
||||
GlassFrameThickness="1"
|
||||
ResizeBorderThickness="4"
|
||||
CaptionHeight="0" />
|
||||
</WindowChrome.WindowChrome>
|
||||
<Grid>
|
||||
<Frame
|
||||
Background="Transparent"
|
||||
Source="Pages/Main/MainPage.xaml"
|
||||
NavigationUIVisibility="Hidden" />
|
||||
</Grid>
|
||||
</Window>
|
||||
@ -1,26 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace VideoLinkDownloader
|
||||
{
|
||||
public partial class MainWindow
|
||||
{
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,16 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VideoLinkDownloader
|
||||
{
|
||||
public abstract class NotificationObject : INotifyPropertyChanged
|
||||
{
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
protected void OnPropertyChanged(string propertyName = "")
|
||||
=> PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
@ -1,69 +0,0 @@
|
||||
<Page
|
||||
x:Class="VideoLinkDownloader.Pages.MainPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
Background="Transparent"
|
||||
Title="MainPage">
|
||||
|
||||
<Grid>
|
||||
<ItemsControl
|
||||
Margin="30"
|
||||
ItemsSource="{Binding VideoTasks}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="6*" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.Resources>
|
||||
<Style
|
||||
TargetType="TextBlock">
|
||||
<Setter
|
||||
Property="Foreground"
|
||||
Value="{StaticResource Foreground}" />
|
||||
<Setter
|
||||
Property="HorizontalAlignment"
|
||||
Value="Center" />
|
||||
<Setter
|
||||
Property="VerticalAlignment"
|
||||
Value="Center" />
|
||||
<Setter
|
||||
Property="TextWrapping"
|
||||
Value="Wrap" />
|
||||
</Style>
|
||||
</Grid.Resources>
|
||||
<TextBlock
|
||||
Text="{Binding Title}" />
|
||||
<TextBlock
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Text="{Binding PercentProgress}" />
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
Text="{Binding SizeProgress}" />
|
||||
<ProgressBar
|
||||
Grid.Row="1"
|
||||
Maximum="1"
|
||||
Minimum="0"
|
||||
Height="2"
|
||||
Margin="12,0"
|
||||
BorderThickness="0"
|
||||
Background="#4888"
|
||||
Foreground="{StaticResource ThemeColor}"
|
||||
Value="{Binding Progress}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</Grid>
|
||||
</Page>
|
||||
@ -1,27 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using VideoLinkDownloader.Pages.Main;
|
||||
|
||||
namespace VideoLinkDownloader.Pages
|
||||
{
|
||||
public partial class MainPage : Page
|
||||
{
|
||||
public MainPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContext = new MainPageViewModel();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,29 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using VideoLinkDownloader.Core;
|
||||
|
||||
namespace VideoLinkDownloader.Pages.Main
|
||||
{
|
||||
class MainPageViewModel : NotificationObject
|
||||
{
|
||||
public MainPageViewModel()
|
||||
{
|
||||
if (Clipboard.ContainsText())
|
||||
{
|
||||
var text = Clipboard.GetText();
|
||||
var (success, videos) = Video.Parse(text);
|
||||
if (success)
|
||||
{
|
||||
videos.ForEach(video => VideoTasks.Add(new VideoTask(video)));
|
||||
}
|
||||
}
|
||||
VideoTasks.ForEach(async it => await it.Download());
|
||||
}
|
||||
public ObservableCollection<VideoTask> VideoTasks { get; } = new ObservableCollection<VideoTask>();
|
||||
}
|
||||
}
|
||||
@ -1,55 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Resources;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("Video Link Downloader")]
|
||||
[assembly: AssemblyDescription("Bilibili Evolved Video Link Downloader")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Grant Howard")]
|
||||
[assembly: AssemblyProduct("Video Link Downloader")]
|
||||
[assembly: AssemblyCopyright("Copyright © Grant Howard 2019")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
//若要开始生成可本地化的应用程序,请设置
|
||||
//.csproj 文件中的 <UICulture>CultureYouAreCodingWith</UICulture>
|
||||
//例如,如果您在源文件中使用的是美国英语,
|
||||
//使用的是美国英语,请将 <UICulture> 设置为 en-US。 然后取消
|
||||
//对以下 NeutralResourceLanguage 特性的注释。 更新
|
||||
//以下行中的“en-US”以匹配项目文件中的 UICulture 设置。
|
||||
|
||||
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
|
||||
|
||||
|
||||
[assembly: ThemeInfo(
|
||||
ResourceDictionaryLocation.None, //主题特定资源词典所处位置
|
||||
//(未在页面中找到资源时使用,
|
||||
//或应用程序资源字典中找到时使用)
|
||||
ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置
|
||||
//(未在页面中找到资源时使用,
|
||||
//、应用程序或任何主题专用资源字典中找到时使用)
|
||||
)]
|
||||
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
|
||||
// 方法是按如下所示使用“*”: :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.7.28.0")]
|
||||
[assembly: AssemblyFileVersion("1.7.28.0")]
|
||||
@ -1,71 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本: 4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace VideoLinkDownloader.Properties
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 强类型资源类,用于查找本地化字符串等。
|
||||
/// </summary>
|
||||
// 此类是由 StronglyTypedResourceBuilder
|
||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
// 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources
|
||||
{
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返回此类使用的缓存 ResourceManager 实例。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((resourceMan == null))
|
||||
{
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("VideoLinkDownloader.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 覆盖当前线程的 CurrentUICulture 属性
|
||||
/// 使用此强类型的资源类的资源查找。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,117 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@ -1,30 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace VideoLinkDownloader.Properties
|
||||
{
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
@ -1,11 +0,0 @@
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:VideoLinkDownloader">
|
||||
<SolidColorBrush
|
||||
x:Key="Background"
|
||||
Color="#181818" />
|
||||
<SolidColorBrush
|
||||
x:Key="Foreground"
|
||||
Color="#eee" />
|
||||
</ResourceDictionary>
|
||||
@ -1,11 +0,0 @@
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:VideoLinkDownloader">
|
||||
<SolidColorBrush
|
||||
x:Key="Background"
|
||||
Color="#fff" />
|
||||
<SolidColorBrush
|
||||
x:Key="Foreground"
|
||||
Color="#000" />
|
||||
</ResourceDictionary>
|
||||
@ -1,138 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{B520B1C6-5C3A-403B-8B78-43386D11ECBE}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>VideoLinkDownloader</RootNamespace>
|
||||
<AssemblyName>VideoLinkDownloader</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject>VideoLinkDownloader.App</StartupObject>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>Bilibili-Evolved.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xaml">
|
||||
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ApplicationDefinition Include="App.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</ApplicationDefinition>
|
||||
<Compile Include="Extensions.cs" />
|
||||
<Compile Include="VideoTask.cs" />
|
||||
<Page Include="MainWindow.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Compile Include="AcrylicBlur.cs" />
|
||||
<Compile Include="App.xaml.cs">
|
||||
<DependentUpon>App.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MainWindow.xaml.cs">
|
||||
<DependentUpon>MainWindow.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Page Include="Pages\Main\MainPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Theme.Dark.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="NotificationObject.cs" />
|
||||
<Compile Include="Pages\Main\MainPage.xaml.cs">
|
||||
<DependentUpon>MainPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Pages\Main\MainPageViewModel.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Page Include="Theme.Light.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Bilibili-Evolved.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\VideoLinkDownloader.Core\VideoLinkDownloader.Core.csproj">
|
||||
<Project>{f60e759e-6551-426f-a08b-5cfc68d0caf5}</Project>
|
||||
<Name>VideoLinkDownloader.Core</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@ -1,41 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VideoLinkDownloader.Core;
|
||||
|
||||
namespace VideoLinkDownloader
|
||||
{
|
||||
class VideoTask : NotificationObject
|
||||
{
|
||||
public VideoTask(Video video)
|
||||
{
|
||||
Downloader = new VideoDownloader(video);
|
||||
Downloader.ProgressUpdate.Add(progress =>
|
||||
{
|
||||
Progress = progress;
|
||||
});
|
||||
}
|
||||
public VideoDownloader Downloader { get; private set; }
|
||||
|
||||
private double progress = 0;
|
||||
public double Progress
|
||||
{
|
||||
get => progress;
|
||||
set
|
||||
{
|
||||
progress = value;
|
||||
OnPropertyChanged(nameof(Progress));
|
||||
OnPropertyChanged(nameof(SizeProgress));
|
||||
}
|
||||
}
|
||||
public string Title => Downloader.Video.Title;
|
||||
public string PercentProgress => $"{Math.Floor(Progress * 1000) / 10}%";
|
||||
public string SizeProgress => $"{Downloader.DownloadedBytes.ToFileSize()} / {Downloader.Video.TotalSize.ToFileSize()}";
|
||||
public async Task Download()
|
||||
{
|
||||
await Downloader.Download();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Newtonsoft.Json" version="12.0.2" targetFramework="net472" />
|
||||
</packages>
|
||||
138
min/bundle.json
Normal file
138
min/bundle.json
Normal file
@ -0,0 +1,138 @@
|
||||
{
|
||||
"about.min.css": "86FA62FF7469866E6B04F037A52951A2A8FF44F5",
|
||||
"about.min.html": "FDCCD18FA788F70703089795D8CEC94078759F63",
|
||||
"about.min.js": "24627AA53E2D264367719AF49D11ECD089BA853D",
|
||||
"aria2-rpc.min.js": "C73BBD8EA943758409ED6D42C8ACBDC0288DAB7A",
|
||||
"auto-continue.min.js": "0E0B4CAEC2FD0AC9D643D38BB2040D6829232A03",
|
||||
"auto-draw.min.js": "2D466B9C0C431DD155934892B2946DDED8536528",
|
||||
"auto-play.min.js": "09A7F7A6F6B99211E0E3AD8611131C2F77BF9391",
|
||||
"batch-download.min.js": "CBBB77466253770D76CB2935C16CA7FC16E839D6",
|
||||
"biliplus-redirect.min.js": "9C250C7088E282EE4F39B1F2B2DAB653C2E395C1",
|
||||
"blur-video-control.min.css": "C61974A5CD6AA8FF896AE5AC1D24D4018C852CC0",
|
||||
"blur-video-control.min.js": "B6533333805AEEDB60D0EA1FF4F150E114C8ACAE",
|
||||
"clear-cache.min.js": "D8F80BA4EE3BD553ED7914074891AD668E3BED49",
|
||||
"combo-like.min.js": "8EA9E2D6078A46BFF6BF6C3730E8115F6A2632A6",
|
||||
"comment-dark.min.css": "6204C3B3E9D0C2A12E0FCB0034475AC32F1FEBE7",
|
||||
"comment.min.css": "1398A9BEC0B792152E303105F2F4EEBCEA7CD8EA",
|
||||
"comment.min.js": "90F9490CF7368EB596FF94BBAEE360A79C91031F",
|
||||
"compact-layout.min.css": "058EBDC087202FB2387A273544D63CE57990C5A6",
|
||||
"compact-layout.min.js": "135AB9F5D8B93EF611A34594C3B552C188038777",
|
||||
"custom-control-background.min.css": "3A5079E4725C0EE3FD1941728EEA372AB55B7517",
|
||||
"custom-control-background.min.js": "EDD397D78935F16EC824E91013C7C062F8D73209",
|
||||
"custom-navbar.min.css": "44F50E5D3A16517A3500145458E33E65B7A53F4C",
|
||||
"custom-navbar.min.html": "B85D91C28F36AD5CD4082728EB0A1E102C4415CC",
|
||||
"custom-navbar.min.js": "97A7874F6B45A3B5D665B8A08C3F18C2215A7038",
|
||||
"danmaku-converter.min.js": "46B3F50018CE0CE7A22C734AF0AD1D25066976FC",
|
||||
"dark-important.min.css": "0C2BE5279D3775F5BD9A3894613AC20E609210A3",
|
||||
"dark-navbar.min.css": "81B8E4AA04CF6248CD373C1A880962DFDE4C0F2F",
|
||||
"dark-schedule.min.js": "C6ADC63089262648122010B8A91BE0C70B275822",
|
||||
"dark-styles.min.js": "045F76BA699DE85D37EFFDB4F38D9B80D3FA51B5",
|
||||
"dark.min.css": "5DA07DABF88EF28A1E217F22B4096DCC3658C53C",
|
||||
"debounce.min.js": "49CF926C92433B63519B5042FF45C8ADBB9A6DA4",
|
||||
"default-danmaku-settings.min.css": "88517CF6E657C4746CC4B26517D081A12E43578A",
|
||||
"default-danmaku-settings.min.js": "08F0110887814A8CCDB503EFDB7F634C88AAFFF8",
|
||||
"default-player-layout.min.js": "9B2AFE500DC61BB2E33B38B0CC1653CF49A77AA7",
|
||||
"default-player-mode.min.js": "E25E897D36D6BB3B52A4057C5C887CC0AB67E87B",
|
||||
"default-video-quality.min.js": "4E5C35EBD13B8496690CFE631678DA96B2422F86",
|
||||
"default-video-speed.min.js": "CC2E11E9D57FC2723B56660454994C86CB6426FF",
|
||||
"double-click-fullscreen.min.js": "F6574BBFE0AB6D356B4B83A4446BEA317C9C6F5B",
|
||||
"download-audio.min.js": "D763AFADC729D89162A0E10498CFE4115D63F1B6",
|
||||
"download-danmaku.min.js": "2EBDDA04E723FD536A1995F87273C56752884826",
|
||||
"download-video.min.css": "51FEB869D2E5DE01CBD8EF2D3C1D1E67333E7E2E",
|
||||
"download-video.min.html": "3952BCA12FA63CA1B78A9936D36B357DAC72B843",
|
||||
"download-video.min.js": "39300B948F09410F6BB74D57A9FAC50E2FA4EA39",
|
||||
"expand-danmaku.min.js": "9D990E92B4C2417B664DD0A3E53CC89033A95029",
|
||||
"expand-description.min.css": "67BB65BE81C4376E0ED59AFF456B89D28A75D8CD",
|
||||
"expand-description.min.js": "A10BF51E596AF523BBAE21C3DEFCF40BFE26CB4C",
|
||||
"favorites-redirect.min.js": "FCFFF0E9F08396AF6A28D8E999FEF0D7261FBF95",
|
||||
"fix-fullscreen.min.js": "2AF7C74185E6270E03206CE712BCC3A6FA058DA8",
|
||||
"fold-comment.min.css": "02BAFE53474A7B63CCE57F7AAB9E65843F4ADEB6",
|
||||
"fold-comment.min.js": "5F20F55791BB48F352ECB9C4C4B197D4F2676ABE",
|
||||
"frame-playback.min.css": "20B3EB4256CFC7A775CDF880044A6C8F6F265620",
|
||||
"frame-playback.min.html": "E20EE14DE942C9B581D1A24616519DEF6D86D262",
|
||||
"frame-playback.min.js": "04BC29E880A76F7D81DF891F10FDE3FAC7DDD88F",
|
||||
"full-page-title.min.css": "54CC0813E3592F055AB44B74B411C17DE8EE1FFC",
|
||||
"full-page-title.min.js": "2B0703A2E2D61B930BE3647675C5BFAA12A13D62",
|
||||
"full-tweets-title.min.css": "E0059CC377CA217AC7673003C1C93D76CCC98EC9",
|
||||
"full-tweets-title.min.js": "9613FC3B874D668AB812255339890336DD2656BD",
|
||||
"gui-settings.min.css": "BC843012C12841D75C930D58A8D756335014A1F3",
|
||||
"gui-settings.min.html": "0843A5F68EC1C8BF6A898DCFAF3CC713061A82EA",
|
||||
"gui-settings.min.js": "29C33F90D65FA56CD9BA275F0D74C0988ADDC2D8",
|
||||
"haruna-scale.min.js": "4504C23D2F3B8743C9A545F8A48A38F6C52F88C4",
|
||||
"hide-bangumi-reviews.min.js": "6E3452013F039EAE1B864EDAC7EAEF9E27B6EBCE",
|
||||
"hide-banner.min.css": "B5E140FB4A22CE3A5310EBC5D9D0CCE69F9D3A1A",
|
||||
"hide-banner.min.js": "739863A6B98CBDB41EC93BB8BE1999E5421762CB",
|
||||
"hide-category.min.js": "E8D445C3DA92058045DF09A969935437D2A45D07",
|
||||
"hide-old-entry.min.js": "81127974CA0D88EE3F202006412044EB78426890",
|
||||
"hide-top-search.min.js": "A6BA72841AE8180E320724430944B129A99972BD",
|
||||
"i18n.de-DE.min.js": "D74F4A3CD52ECDE56793DFF218D57049B91D91F7",
|
||||
"i18n.en-US.min.js": "71EB7755A96FA32A8B7C4FD66B6E605FB34200A9",
|
||||
"i18n.ja-JP.min.js": "A1FFF6A247566A2D05A741BA1506E8500BDEA529",
|
||||
"i18n.min.css": "329A63BECB26C1E26D07C8E665859308C3FED60B",
|
||||
"i18n.min.js": "E6F863D48F42692AA3ABAA81426A2C536CB15E8B",
|
||||
"i18n.zh-TW.min.js": "07AF202524BD56084554AAD87D9B337B3FD740C5",
|
||||
"icons.min.css": "382CC84865AB0EE0D8BDB51A9ADEE79D6930AA41",
|
||||
"image-resolution.min.js": "89D95D21E9DBB1BE6127515E5E17825882BDE3F5",
|
||||
"image-viewer.min.css": "647D1BADA7307322299DF10037A6A9403E0963ED",
|
||||
"image-viewer.min.html": "C86BD84F084760561ED0E62729F9F4F019071562",
|
||||
"index.min.html": "936B617145931F26ADD66DF4D37F9AAB28775CC4",
|
||||
"keymap.min.js": "9DA4392C0CCC4B7FEC8AAEE640F9238A63060DE8",
|
||||
"magic-grid.min.js": "4E169F1B73BFE794256D3BA56F16342B059C4E59",
|
||||
"mdi.min.js": "A6E3CF8FCA5C6A6BA90B3959259A879CA218B5A9",
|
||||
"medal-helper.min.css": "2800728203E3A80B408A25178F64682813D00883",
|
||||
"medal-helper.min.html": "01F010227BEF92D9926C386AA79A6D88C7086CBB",
|
||||
"medal-helper.min.js": "84B06923EF414055D16607745CFB0238258AA700",
|
||||
"narrow-danmaku.min.js": "10112E3101B47DA91D32F55C99B19C65EAD5E148",
|
||||
"new-styles.min.js": "227A7E8297A53E9C56CBF45D42D665CEB6022ECB",
|
||||
"no-banner.min.css": "93E7DAA6E93A2AAD95C348052C9B5CB0DE901C51",
|
||||
"no-live-autoplay.min.js": "DB2ACEF0458CC8F502F7104DCAA99CD7D52A9AB6",
|
||||
"no-mini-video-autoplay.min.js": "2891812319992F87679AB8CBF83C9953E52F81B8",
|
||||
"notify-new-version.min.js": "127ED0C80CC3A854B4D618707AFA0837619AC43A",
|
||||
"old-tweets.min.js": "127E70AAB00CFEFE690DF0DE46EEA95CD0ED314A",
|
||||
"old.min.css": "31CD10AFC1C2FB79EAC91263B1A69A364C6A9713",
|
||||
"outer-watchlater.min.css": "849EFDFC9690351B982987F920EF2F821A9396D2",
|
||||
"outer-watchlater.min.js": "861A3A451006CC6A7F824CAB2BAF83145A069DC9",
|
||||
"override-navbar.min.css": "63B8EAEDDB086D4F442CD9C77B088A6C75D4E4D0",
|
||||
"override-navbar.min.js": "C047CEE9A65FB7A7E2808E7498F0836A82BB0F4A",
|
||||
"player-focus.min.js": "943788D3E63548196446CFED5F3CDB6A40B3F6F0",
|
||||
"player-shadow.min.js": "BDF976E12627608D3D71723F2DE8DF693DCADFD1",
|
||||
"remove-promotions.min.css": "9D35FFA5872531C2C3EC27049D8B9493CA685414",
|
||||
"remove-promotions.min.js": "DD26F898864D52862B5E4DB0E7D7165F2BF04273",
|
||||
"remove-top-mask.min.js": "B9FC5E0D843E50AE4805BEBFB91C657DF49425F6",
|
||||
"remove-watermark.min.js": "541BEA800F30AF018C62A2C3A227518BB4D69490",
|
||||
"screenshot.min.css": "37FB59ED5F74BFE51F623CAD7C10C96BDC57FA94",
|
||||
"screenshot.min.js": "9DE7966851921D5BA46F33B6298C15E4A46F2438",
|
||||
"scrollbar.min.css": "BDDE799C6A499902742CA5A2F49EB3FEA8D6A4BA",
|
||||
"seeds-to-coins.min.js": "382113069939CC2750CC3066E1F7DB0805FC4146",
|
||||
"settings-search.min.js": "E40DBC279DC35A8C6FD5FCCADD4C8F92618A3EE2",
|
||||
"settings-side-bar.min.js": "5B2888B0FA743F5CE1D2A06C00E65EB297211A1C",
|
||||
"settings-tooltip.en-US.min.js": "B80A81B58F0DB4F61D396D0592249F9A0582775F",
|
||||
"settings-tooltip.ja-JP.min.js": "E5552E41AB7CE8F6856AFB6C14EDB6FB8768823B",
|
||||
"settings-tooltip.loader.min.js": "1262709D0C776EA8EC7BF8C298443CB03D85C7A4",
|
||||
"settings-tooltip.min.css": "398B0FD750875F9CD85ABF52A245A6D14001C71A",
|
||||
"settings-tooltip.min.js": "217D4E0521E98471E6204121E5279DF53FC3D11C",
|
||||
"settings-tooltip.zh-CN.min.js": "6FCB5C64213D403AE661E26AE151D82D1998F707",
|
||||
"show-dead-video-title.min.js": "4396DCCC77AE950ECEF3118DE4BBCC71897488B2",
|
||||
"simplify-liveroom.min.css": "4AE41231E47FA544C253D39053D1A277AE32D49F",
|
||||
"simplify-liveroom.min.js": "7630A9C9B298CFFC5AEA5C16A9CC85AE6876C42F",
|
||||
"skip-charge-list.min.css": "6468722B03708E3A932A04A16C631E9D202B0769",
|
||||
"skip-charge-list.min.js": "041CE3E335F21EFC0E9690DF30FCE317A1EF8723",
|
||||
"slip.min.js": "11FD17D8798E44AAC410863B92713783CFB27454",
|
||||
"style.min.css": "648B985AECA76C648767C8442C567E4B195D264C",
|
||||
"text-validate.min.js": "F4EBB11EC114E00FDE728DC55315EADF19926C5D",
|
||||
"theme-colors.min.js": "8797934CDEF9833A47AB5BCA074E00DCE14AF13B",
|
||||
"title.min.js": "D219DFD96644E2C4680969FF3CC0D9B6200894C4",
|
||||
"toast.min.css": "85D8CBA4E67442638073D449B90440D79CA4844B",
|
||||
"toast.min.js": "4471B50E41BB5BFD94C4BB0C4DFCFE8E585F3422",
|
||||
"touch-navbar.min.js": "4CF82B9BFABE0A226332494F86FE5B82A98C614A",
|
||||
"touch-player.min.css": "EAC837A10E204A94F7DE0F1C3A43FA8D36123B5A",
|
||||
"touch-player.min.js": "F922A7CCF4AC8282C2F1D356FF5D230D7117A1DD",
|
||||
"tweets.min.css": "2854257C4DB7AB2BEC99C80C3C9BE715D5E92746",
|
||||
"v-checkbox.vue.min.js": "538637DC1FA515E118169A465F7EE550F2F23FF9",
|
||||
"v-dropdown.vue.min.js": "BAE8C472F3B8F217CC821219C983774133FA7A25",
|
||||
"video-info.min.js": "356B63564464C81C5C7F45367F4CFF38B0B6FC25",
|
||||
"video-story.min.js": "7EE63FC3328CFD2457E990FEA9AB16B1F8452014",
|
||||
"view-cover.min.js": "658E2CDB9606D3AECB466572E0718EA7B4F363A6",
|
||||
"watchlater-api.min.js": "112BE78EA600530F1C8CB406594856DEC9B684DC",
|
||||
"watchlater.min.js": "6D8C28C5163FF4E80B9870DD3E65EA2D5A0E55A1"
|
||||
}
|
||||
BIN
min/bundle.zip
Normal file
BIN
min/bundle.zip
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user