修改多语言实现

This commit is contained in:
nilaoda 2022-08-16 11:44:14 +08:00
parent 6dba4eccf5
commit 893331ed02
12 changed files with 506 additions and 1499 deletions

View File

@ -13,28 +13,4 @@
<PackageReference Include="Spectre.Console" Version="0.44.1-preview.0.17" />
</ItemGroup>
<ItemGroup>
<Compile Update="Resource\ResString.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>ResString.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Resource\ResString.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<PublicClass>true</PublicClass>
<LastGenOutput>ResString.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Update="Resource\ResString.zh-Hans.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<PublicClass>true</PublicClass>
</EmbeddedResource>
<EmbeddedResource Update="Resource\ResString.zh-Hant.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<PublicClass>true</PublicClass>
</EmbeddedResource>
</ItemGroup>
</Project>

View File

@ -1,596 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace N_m3u8DL_RE.Common.Resource {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class ResString {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal ResString() {
}
/// <summary>
/// 返回此类使用的缓存的 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("N_m3u8DL_RE.Common.Resource.ResString", typeof(ResString).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 重写当前线程的 CurrentUICulture 属性,对
/// 使用此强类型资源类的所有资源查找执行重写。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// 查找类似 fMP4 is detected, binary merging is automatically enabled 的本地化字符串。
/// </summary>
public static string autoBinaryMerge {
get {
return ResourceManager.GetString("autoBinaryMerge", resourceCulture);
}
}
/// <summary>
/// 查找类似 Dolby Vision content is detected, binary merging is automatically enabled 的本地化字符串。
/// </summary>
public static string autoBinaryMerge2 {
get {
return ResourceManager.GetString("autoBinaryMerge2", resourceCulture);
}
}
/// <summary>
/// 查找类似 An unrecognized encryption method is detected, binary merging is automatically enabled 的本地化字符串。
/// </summary>
public static string autoBinaryMerge3 {
get {
return ResourceManager.GetString("autoBinaryMerge3", resourceCulture);
}
}
/// <summary>
/// 查找类似 Bad m3u8 的本地化字符串。
/// </summary>
public static string badM3u8 {
get {
return ResourceManager.GetString("badM3u8", resourceCulture);
}
}
/// <summary>
/// 查找类似 Binary merging... 的本地化字符串。
/// </summary>
public static string binaryMerge {
get {
return ResourceManager.GetString("binaryMerge", resourceCulture);
}
}
/// <summary>
/// 查找类似 Verifying the validity of the last segment 的本地化字符串。
/// </summary>
public static string checkingLast {
get {
return ResourceManager.GetString("checkingLast", resourceCulture);
}
}
/// <summary>
/// 查找类似 Add Params of input Url to segments, useful for some websites, such as kakao.com 的本地化字符串。
/// </summary>
public static string cmd_appendUrlParams {
get {
return ResourceManager.GetString("cmd_appendUrlParams", resourceCulture);
}
}
/// <summary>
/// 查找类似 Automatically selects the best tracks of all types 的本地化字符串。
/// </summary>
public static string cmd_autoSelect {
get {
return ResourceManager.GetString("cmd_autoSelect", resourceCulture);
}
}
/// <summary>
/// 查找类似 Binary merge 的本地化字符串。
/// </summary>
public static string cmd_binaryMerge {
get {
return ResourceManager.GetString("cmd_binaryMerge", resourceCulture);
}
}
/// <summary>
/// 查找类似 Check if the actual number of segments downloaded matches the expected number 的本地化字符串。
/// </summary>
public static string cmd_checkSegmentsCount {
get {
return ResourceManager.GetString("cmd_checkSegmentsCount", resourceCulture);
}
}
/// <summary>
/// 查找类似 Full path to the tool used for MP4 decryption, like C:\Tools\mp4decrypt.exe 的本地化字符串。
/// </summary>
public static string cmd_decryptionBinaryPath {
get {
return ResourceManager.GetString("cmd_decryptionBinaryPath", resourceCulture);
}
}
/// <summary>
/// 查找类似 Delete temporary files when done 的本地化字符串。
/// </summary>
public static string cmd_delAfterDone {
get {
return ResourceManager.GetString("cmd_delAfterDone", resourceCulture);
}
}
/// <summary>
/// 查找类似 Full path to the ffmpeg binary, like C:\Tools\ffmpeg.exe 的本地化字符串。
/// </summary>
public static string cmd_ffmpegBinaryPath {
get {
return ResourceManager.GetString("cmd_ffmpegBinaryPath", resourceCulture);
}
}
/// <summary>
/// 查找类似 Pass custom header(s) to server, Example:
///-H &quot;Cookie: mycookie&quot; -H &quot;User-Agent: iOS&quot; 的本地化字符串。
/// </summary>
public static string cmd_header {
get {
return ResourceManager.GetString("cmd_header", resourceCulture);
}
}
/// <summary>
/// 查找类似 Input Url or File 的本地化字符串。
/// </summary>
public static string cmd_Input {
get {
return ResourceManager.GetString("cmd_Input", resourceCulture);
}
}
/// <summary>
/// 查找类似 Pass decryption key(s) to mp4decrypt/shaka-packager. format:
///--key KID1:KEY1 --key KID2:KEY2 的本地化字符串。
/// </summary>
public static string cmd_keys {
get {
return ResourceManager.GetString("cmd_keys", resourceCulture);
}
}
/// <summary>
/// 查找类似 Set the kid-key file, the program will search the KEY with KID from the file.(Very large file are not recommended) 的本地化字符串。
/// </summary>
public static string cmd_keyText {
get {
return ResourceManager.GetString("cmd_keyText", resourceCulture);
}
}
/// <summary>
/// 查找类似 Failed to get KEY, ignore. 的本地化字符串。
/// </summary>
public static string cmd_loadKeyFailed {
get {
return ResourceManager.GetString("cmd_loadKeyFailed", resourceCulture);
}
}
/// <summary>
/// 查找类似 Set log level 的本地化字符串。
/// </summary>
public static string cmd_logLevel {
get {
return ResourceManager.GetString("cmd_logLevel", resourceCulture);
}
}
/// <summary>
/// 查找类似 Decrypt MP4 segments in real time 的本地化字符串。
/// </summary>
public static string cmd_MP4RealTimeDecryption {
get {
return ResourceManager.GetString("cmd_MP4RealTimeDecryption", resourceCulture);
}
}
/// <summary>
/// 查找类似 Set output directory 的本地化字符串。
/// </summary>
public static string cmd_saveDir {
get {
return ResourceManager.GetString("cmd_saveDir", resourceCulture);
}
}
/// <summary>
/// 查找类似 Set output filename 的本地化字符串。
/// </summary>
public static string cmd_saveName {
get {
return ResourceManager.GetString("cmd_saveName", resourceCulture);
}
}
/// <summary>
/// 查找类似 的本地化字符串。
/// </summary>
public static string cmd_savePattern {
get {
return ResourceManager.GetString("cmd_savePattern", resourceCulture);
}
}
/// <summary>
/// 查找类似 Skip download 的本地化字符串。
/// </summary>
public static string cmd_skipDownload {
get {
return ResourceManager.GetString("cmd_skipDownload", resourceCulture);
}
}
/// <summary>
/// 查找类似 Skip segments merge 的本地化字符串。
/// </summary>
public static string cmd_skipMerge {
get {
return ResourceManager.GetString("cmd_skipMerge", resourceCulture);
}
}
/// <summary>
/// 查找类似 Subtitle output format 的本地化字符串。
/// </summary>
public static string cmd_subFormat {
get {
return ResourceManager.GetString("cmd_subFormat", resourceCulture);
}
}
/// <summary>
/// 查找类似 Select only subtitle tracks 的本地化字符串。
/// </summary>
public static string cmd_subOnly {
get {
return ResourceManager.GetString("cmd_subOnly", resourceCulture);
}
}
/// <summary>
/// 查找类似 Automatically fix subtitles 的本地化字符串。
/// </summary>
public static string cmd_subtitleFix {
get {
return ResourceManager.GetString("cmd_subtitleFix", resourceCulture);
}
}
/// <summary>
/// 查找类似 Set download thread count 的本地化字符串。
/// </summary>
public static string cmd_threadCount {
get {
return ResourceManager.GetString("cmd_threadCount", resourceCulture);
}
}
/// <summary>
/// 查找类似 Set temporary file directory 的本地化字符串。
/// </summary>
public static string cmd_tmpDir {
get {
return ResourceManager.GetString("cmd_tmpDir", resourceCulture);
}
}
/// <summary>
/// 查找类似 Set UI language 的本地化字符串。
/// </summary>
public static string cmd_uiLanguage {
get {
return ResourceManager.GetString("cmd_uiLanguage", resourceCulture);
}
}
/// <summary>
/// 查找类似 Give these arguments to the URL Processors. 的本地化字符串。
/// </summary>
public static string cmd_urlProcessorArgs {
get {
return ResourceManager.GetString("cmd_urlProcessorArgs", resourceCulture);
}
}
/// <summary>
/// 查找类似 Use shaka-packager instead of mp4decrypt 的本地化字符串。
/// </summary>
public static string cmd_useShakaPackager {
get {
return ResourceManager.GetString("cmd_useShakaPackager", resourceCulture);
}
}
/// <summary>
/// 查找类似 Write meta json after parsed 的本地化字符串。
/// </summary>
public static string cmd_writeMetaJson {
get {
return ResourceManager.GetString("cmd_writeMetaJson", resourceCulture);
}
}
/// <summary>
/// 查找类似 Fetch: 的本地化字符串。
/// </summary>
public static string fetch {
get {
return ResourceManager.GetString("fetch", resourceCulture);
}
}
/// <summary>
/// 查找类似 ffmpeg merging... 的本地化字符串。
/// </summary>
public static string ffmpegMerge {
get {
return ResourceManager.GetString("ffmpegMerge", resourceCulture);
}
}
/// <summary>
/// 查找类似 ffmpeg not found, please download at: https://ffmpeg.org/download.html 的本地化字符串。
/// </summary>
public static string ffmpegNotFound {
get {
return ResourceManager.GetString("ffmpegNotFound", resourceCulture);
}
}
/// <summary>
/// 查找类似 Extracting TTML(raw) subtitle... 的本地化字符串。
/// </summary>
public static string fixingTTML {
get {
return ResourceManager.GetString("fixingTTML", resourceCulture);
}
}
/// <summary>
/// 查找类似 Extracting TTML(mp4) subtitle... 的本地化字符串。
/// </summary>
public static string fixingTTMLmp4 {
get {
return ResourceManager.GetString("fixingTTMLmp4", resourceCulture);
}
}
/// <summary>
/// 查找类似 Extracting VTT(raw) subtitle... 的本地化字符串。
/// </summary>
public static string fixingVTT {
get {
return ResourceManager.GetString("fixingVTT", resourceCulture);
}
}
/// <summary>
/// 查找类似 Extracting VTT(mp4) subtitle... 的本地化字符串。
/// </summary>
public static string fixingVTTmp4 {
get {
return ResourceManager.GetString("fixingVTTmp4", resourceCulture);
}
}
/// <summary>
/// 查找类似 No Processor matched 的本地化字符串。
/// </summary>
public static string keyProcessorNotFound {
get {
return ResourceManager.GetString("keyProcessorNotFound", resourceCulture);
}
}
/// <summary>
/// 查找类似 Live stream found 的本地化字符串。
/// </summary>
public static string liveFound {
get {
return ResourceManager.GetString("liveFound", resourceCulture);
}
}
/// <summary>
/// 查找类似 Loading URL: 的本地化字符串。
/// </summary>
public static string loadingUrl {
get {
return ResourceManager.GetString("loadingUrl", resourceCulture);
}
}
/// <summary>
/// 查找类似 Master List detected, try parse all streams 的本地化字符串。
/// </summary>
public static string masterM3u8Found {
get {
return ResourceManager.GetString("masterM3u8Found", resourceCulture);
}
}
/// <summary>
/// 查找类似 Content Matched: [white on mediumorchid1]Dynamic Adaptive Streaming over HTTP[/] 的本地化字符串。
/// </summary>
public static string matchDASH {
get {
return ResourceManager.GetString("matchDASH", resourceCulture);
}
}
/// <summary>
/// 查找类似 Content Matched: [white on deepskyblue1]HTTP Live Streaming[/] 的本地化字符串。
/// </summary>
public static string matchHLS {
get {
return ResourceManager.GetString("matchHLS", resourceCulture);
}
}
/// <summary>
/// 查找类似 Input not supported: 的本地化字符串。
/// </summary>
public static string notSupported {
get {
return ResourceManager.GetString("notSupported", resourceCulture);
}
}
/// <summary>
/// 查找类似 Parsing streams... 的本地化字符串。
/// </summary>
public static string parsingStream {
get {
return ResourceManager.GetString("parsingStream", resourceCulture);
}
}
/// <summary>
/// 查找类似 [grey](Move up and down to reveal more streams)[/] 的本地化字符串。
/// </summary>
public static string promptChoiceText {
get {
return ResourceManager.GetString("promptChoiceText", resourceCulture);
}
}
/// <summary>
/// 查找类似 (Press [blue]&lt;space&gt;[/] to toggle a stream, [green]&lt;enter&gt;[/] to accept) 的本地化字符串。
/// </summary>
public static string promptInfo {
get {
return ResourceManager.GetString("promptInfo", resourceCulture);
}
}
/// <summary>
/// 查找类似 Please select [green]what you want to download[/]: 的本地化字符串。
/// </summary>
public static string promptTitle {
get {
return ResourceManager.GetString("promptTitle", resourceCulture);
}
}
/// <summary>
/// 查找类似 Reading media info... 的本地化字符串。
/// </summary>
public static string readingInfo {
get {
return ResourceManager.GetString("readingInfo", resourceCulture);
}
}
/// <summary>
/// 查找类似 Trying to search for KEY from text file... 的本地化字符串。
/// </summary>
public static string searchKey {
get {
return ResourceManager.GetString("searchKey", resourceCulture);
}
}
/// <summary>
/// 查找类似 Segment count check not pass, total: {}, downloaded: {}. 的本地化字符串。
/// </summary>
public static string segmentCountCheckNotPass {
get {
return ResourceManager.GetString("segmentCountCheckNotPass", resourceCulture);
}
}
/// <summary>
/// 查找类似 Selected streams: 的本地化字符串。
/// </summary>
public static string selectedStream {
get {
return ResourceManager.GetString("selectedStream", resourceCulture);
}
}
/// <summary>
/// 查找类似 Start downloading... 的本地化字符串。
/// </summary>
public static string startDownloading {
get {
return ResourceManager.GetString("startDownloading", resourceCulture);
}
}
/// <summary>
/// 查找类似 Extracted, there are {} streams, with {} basic streams, {} audio streams, {} subtitle streams 的本地化字符串。
/// </summary>
public static string streamsInfo {
get {
return ResourceManager.GetString("streamsInfo", resourceCulture);
}
}
/// <summary>
/// 查找类似 Writing meta.json 的本地化字符串。
/// </summary>
public static string writeJson {
get {
return ResourceManager.GetString("writeJson", resourceCulture);
}
}
}
}

View File

@ -0,0 +1,86 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace N_m3u8DL_RE.Common.Resource
{
public class ResString
{
public static string autoBinaryMerge { get => GetText("autoBinaryMerge"); }
public static string autoBinaryMerge2 { get => GetText("autoBinaryMerge2"); }
public static string autoBinaryMerge3 { get => GetText("autoBinaryMerge3"); }
public static string badM3u8 { get => GetText("badM3u8"); }
public static string binaryMerge { get => GetText("binaryMerge"); }
public static string checkingLast { get => GetText("checkingLast"); }
public static string cmd_appendUrlParams { get => GetText("cmd_appendUrlParams"); }
public static string cmd_autoSelect { get => GetText("cmd_autoSelect"); }
public static string cmd_binaryMerge { get => GetText("cmd_binaryMerge"); }
public static string cmd_checkSegmentsCount { get => GetText("cmd_checkSegmentsCount"); }
public static string cmd_decryptionBinaryPath { get => GetText("cmd_decryptionBinaryPath"); }
public static string cmd_delAfterDone { get => GetText("cmd_delAfterDone"); }
public static string cmd_ffmpegBinaryPath { get => GetText("cmd_ffmpegBinaryPath"); }
public static string cmd_header { get => GetText("cmd_header"); }
public static string cmd_Input { get => GetText("cmd_Input"); }
public static string cmd_keys { get => GetText("cmd_keys"); }
public static string cmd_keyText { get => GetText("cmd_keyText"); }
public static string cmd_loadKeyFailed { get => GetText("cmd_loadKeyFailed"); }
public static string cmd_logLevel { get => GetText("cmd_logLevel"); }
public static string cmd_MP4RealTimeDecryption { get => GetText("cmd_MP4RealTimeDecryption"); }
public static string cmd_saveDir { get => GetText("cmd_saveDir"); }
public static string cmd_saveName { get => GetText("cmd_saveName"); }
public static string cmd_savePattern { get => GetText("cmd_savePattern"); }
public static string cmd_skipDownload { get => GetText("cmd_skipDownload"); }
public static string cmd_skipMerge { get => GetText("cmd_skipMerge"); }
public static string cmd_subFormat { get => GetText("cmd_subFormat"); }
public static string cmd_subOnly { get => GetText("cmd_subOnly"); }
public static string cmd_subtitleFix { get => GetText("cmd_subtitleFix"); }
public static string cmd_threadCount { get => GetText("cmd_threadCount"); }
public static string cmd_tmpDir { get => GetText("cmd_tmpDir"); }
public static string cmd_uiLanguage { get => GetText("cmd_uiLanguage"); }
public static string cmd_urlProcessorArgs { get => GetText("cmd_urlProcessorArgs"); }
public static string cmd_useShakaPackager { get => GetText("cmd_useShakaPackager"); }
public static string cmd_writeMetaJson { get => GetText("cmd_writeMetaJson"); }
public static string fetch { get => GetText("fetch"); }
public static string ffmpegMerge { get => GetText("ffmpegMerge"); }
public static string ffmpegNotFound { get => GetText("ffmpegNotFound"); }
public static string fixingTTML { get => GetText("fixingTTML"); }
public static string fixingTTMLmp4 { get => GetText("fixingTTMLmp4"); }
public static string fixingVTT { get => GetText("fixingVTT"); }
public static string fixingVTTmp4 { get => GetText("fixingVTTmp4"); }
public static string keyProcessorNotFound { get => GetText("keyProcessorNotFound"); }
public static string liveFound { get => GetText("liveFound"); }
public static string loadingUrl { get => GetText("loadingUrl"); }
public static string masterM3u8Found { get => GetText("masterM3u8Found"); }
public static string matchDASH { get => GetText("matchDASH"); }
public static string matchHLS { get => GetText("matchHLS"); }
public static string notSupported { get => GetText("notSupported"); }
public static string parsingStream { get => GetText("parsingStream"); }
public static string promptChoiceText { get => GetText("promptChoiceText"); }
public static string promptInfo { get => GetText("promptInfo"); }
public static string promptTitle { get => GetText("promptTitle"); }
public static string readingInfo { get => GetText("readingInfo"); }
public static string searchKey { get => GetText("searchKey"); }
public static string segmentCountCheckNotPass { get => GetText("segmentCountCheckNotPass"); }
public static string selectedStream { get => GetText("selectedStream"); }
public static string startDownloading { get => GetText("startDownloading"); }
public static string streamsInfo { get => GetText("streamsInfo"); }
public static string writeJson { get => GetText("writeJson"); }
private static string GetText(string key)
{
if (!StaticText.LANG_DIC.ContainsKey(key))
return "<...LANG TEXT MISSING...>";
var current = Thread.CurrentThread.CurrentUICulture.Name;
if (current == "zh-CN" || current == "zh-SG" || current == "zh-Hans")
return StaticText.LANG_DIC[key].ZH_CN;
else if (current.StartsWith("zh-"))
return StaticText.LANG_DIC[key].ZH_TW;
else
return StaticText.LANG_DIC[key].EN_US;
}
}
}

View File

@ -1,279 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 1.3
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">1.3</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1">this is my long string</data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
[base64 mime encoded serialized .NET Framework object]
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
[base64 mime encoded string representing a byte array form of the .NET Framework object]
</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="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>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="badM3u8" xml:space="preserve">
<value>Bad m3u8</value>
</data>
<data name="notSupported" xml:space="preserve">
<value>Input not supported: </value>
</data>
<data name="loadingUrl" xml:space="preserve">
<value>Loading URL: </value>
</data>
<data name="matchHLS" xml:space="preserve">
<value>Content Matched: [white on deepskyblue1]HTTP Live Streaming[/]</value>
</data>
<data name="masterM3u8Found" xml:space="preserve">
<value>Master List detected, try parse all streams</value>
</data>
<data name="fetch" xml:space="preserve">
<value>Fetch: </value>
</data>
<data name="promptTitle" xml:space="preserve">
<value>Please select [green]what you want to download[/]:</value>
</data>
<data name="promptChoiceText" xml:space="preserve">
<value>[grey](Move up and down to reveal more streams)[/]</value>
</data>
<data name="promptInfo" xml:space="preserve">
<value>(Press [blue]&lt;space&gt;[/] to toggle a stream, [green]&lt;enter&gt;[/] to accept)</value>
</data>
<data name="streamsInfo" xml:space="preserve">
<value>Extracted, there are {} streams, with {} basic streams, {} audio streams, {} subtitle streams</value>
</data>
<data name="liveFound" xml:space="preserve">
<value>Live stream found</value>
</data>
<data name="selectedStream" xml:space="preserve">
<value>Selected streams:</value>
</data>
<data name="writeJson" xml:space="preserve">
<value>Writing meta.json</value>
</data>
<data name="matchDASH" xml:space="preserve">
<value>Content Matched: [white on mediumorchid1]Dynamic Adaptive Streaming over HTTP[/]</value>
</data>
<data name="checkingLast" xml:space="preserve">
<value>Verifying the validity of the last segment</value>
</data>
<data name="parsingStream" xml:space="preserve">
<value>Parsing streams...</value>
</data>
<data name="keyProcessorNotFound" xml:space="preserve">
<value>No Processor matched</value>
</data>
<data name="startDownloading" xml:space="preserve">
<value>Start downloading...</value>
</data>
<data name="segmentCountCheckNotPass" xml:space="preserve">
<value>Segment count check not pass, total: {}, downloaded: {}.</value>
</data>
<data name="fixingVTT" xml:space="preserve">
<value>Extracting VTT(raw) subtitle...</value>
</data>
<data name="fixingVTTmp4" xml:space="preserve">
<value>Extracting VTT(mp4) subtitle...</value>
</data>
<data name="binaryMerge" xml:space="preserve">
<value>Binary merging...</value>
</data>
<data name="fixingTTMLmp4" xml:space="preserve">
<value>Extracting TTML(mp4) subtitle...</value>
</data>
<data name="fixingTTML" xml:space="preserve">
<value>Extracting TTML(raw) subtitle...</value>
</data>
<data name="cmd_Input" xml:space="preserve">
<value>Input Url or File</value>
</data>
<data name="cmd_header" xml:space="preserve">
<value>Pass custom header(s) to server, Example:
-H "Cookie: mycookie" -H "User-Agent: iOS"</value>
</data>
<data name="cmd_logLevel" xml:space="preserve">
<value>Set log level</value>
</data>
<data name="cmd_autoSelect" xml:space="preserve">
<value>Automatically selects the best tracks of all types</value>
</data>
<data name="cmd_subOnly" xml:space="preserve">
<value>Select only subtitle tracks</value>
</data>
<data name="cmd_threadCount" xml:space="preserve">
<value>Set download thread count</value>
</data>
<data name="cmd_skipMerge" xml:space="preserve">
<value>Skip segments merge</value>
</data>
<data name="cmd_binaryMerge" xml:space="preserve">
<value>Binary merge</value>
</data>
<data name="cmd_delAfterDone" xml:space="preserve">
<value>Delete temporary files when done</value>
</data>
<data name="cmd_subtitleFix" xml:space="preserve">
<value>Automatically fix subtitles</value>
</data>
<data name="cmd_checkSegmentsCount" xml:space="preserve">
<value>Check if the actual number of segments downloaded matches the expected number</value>
</data>
<data name="cmd_subFormat" xml:space="preserve">
<value>Subtitle output format</value>
</data>
<data name="cmd_tmpDir" xml:space="preserve">
<value>Set temporary file directory</value>
</data>
<data name="cmd_saveDir" xml:space="preserve">
<value>Set output directory</value>
</data>
<data name="cmd_saveName" xml:space="preserve">
<value>Set output filename</value>
</data>
<data name="cmd_uiLanguage" xml:space="preserve">
<value>Set UI language</value>
</data>
<data name="cmd_skipDownload" xml:space="preserve">
<value>Skip download</value>
</data>
<data name="cmd_writeMetaJson" xml:space="preserve">
<value>Write meta json after parsed</value>
</data>
<data name="cmd_appendUrlParams" xml:space="preserve">
<value>Add Params of input Url to segments, useful for some websites, such as kakao.com</value>
</data>
<data name="cmd_savePattern" xml:space="preserve">
<value></value>
</data>
<data name="cmd_keys" xml:space="preserve">
<value>Pass decryption key(s) to mp4decrypt/shaka-packager. format:
--key KID1:KEY1 --key KID2:KEY2</value>
</data>
<data name="cmd_urlProcessorArgs" xml:space="preserve">
<value>Give these arguments to the URL Processors.</value>
</data>
<data name="cmd_MP4RealTimeDecryption" xml:space="preserve">
<value>Decrypt MP4 segments in real time</value>
</data>
<data name="cmd_useShakaPackager" xml:space="preserve">
<value>Use shaka-packager instead of mp4decrypt</value>
</data>
<data name="cmd_decryptionBinaryPath" xml:space="preserve">
<value>Full path to the tool used for MP4 decryption, like C:\Tools\mp4decrypt.exe</value>
</data>
<data name="cmd_loadKeyFailed" xml:space="preserve">
<value>Failed to get KEY, ignore.</value>
</data>
<data name="autoBinaryMerge" xml:space="preserve">
<value>fMP4 is detected, binary merging is automatically enabled</value>
</data>
<data name="cmd_ffmpegBinaryPath" xml:space="preserve">
<value>Full path to the ffmpeg binary, like C:\Tools\ffmpeg.exe</value>
</data>
<data name="ffmpegMerge" xml:space="preserve">
<value>ffmpeg merging...</value>
</data>
<data name="cmd_keyText" xml:space="preserve">
<value>Set the kid-key file, the program will search the KEY with KID from the file.(Very large file are not recommended)</value>
</data>
<data name="searchKey" xml:space="preserve">
<value>Trying to search for KEY from text file...</value>
</data>
<data name="ffmpegNotFound" xml:space="preserve">
<value>ffmpeg not found, please download at: https://ffmpeg.org/download.html</value>
</data>
<data name="readingInfo" xml:space="preserve">
<value>Reading media info...</value>
</data>
<data name="autoBinaryMerge2" xml:space="preserve">
<value>Dolby Vision content is detected, binary merging is automatically enabled</value>
</data>
<data name="autoBinaryMerge3" xml:space="preserve">
<value>An unrecognized encryption method is detected, binary merging is automatically enabled</value>
</data>
</root>

View File

@ -1,299 +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.Runtime.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:import namespace="http://www.w3.org/XML/1998/namespace" />
<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" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</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" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="badM3u8" xml:space="preserve">
<value>错误的m3u8</value>
</data>
<data name="notSupported" xml:space="preserve">
<value>当前输入不受支持: </value>
</data>
<data name="loadingUrl" xml:space="preserve">
<value>加载URL: </value>
</data>
<data name="matchHLS" xml:space="preserve">
<value>内容匹配: [white on deepskyblue1]HTTP Live Streaming[/]</value>
</data>
<data name="masterM3u8Found" xml:space="preserve">
<value>检测到Master列表开始解析全部流信息</value>
</data>
<data name="fetch" xml:space="preserve">
<value>获取: </value>
</data>
<data name="promptTitle" xml:space="preserve">
<value>请选择 [green]你要下载的内容[/]:</value>
</data>
<data name="promptChoiceText" xml:space="preserve">
<value>[grey](按键盘上下键以浏览更多内容)[/]</value>
</data>
<data name="promptInfo" xml:space="preserve">
<value>(按 [blue]空格键[/] 选择流, [green]回车键[/] 完成选择)</value>
</data>
<data name="streamsInfo" xml:space="preserve">
<value>已解析, 共计 {} 条媒体流, 基本流 {} 条, 可选音频流 {} 条, 可选字幕流 {} 条</value>
</data>
<data name="liveFound" xml:space="preserve">
<value>检测到直播流</value>
</data>
<data name="selectedStream" xml:space="preserve">
<value>已选择的流:</value>
</data>
<data name="writeJson" xml:space="preserve">
<value>写出meta.json</value>
</data>
<data name="matchDASH" xml:space="preserve">
<value>内容匹配: [white on mediumorchid1]Dynamic Adaptive Streaming over HTTP[/]</value>
</data>
<data name="checkingLast" xml:space="preserve">
<value>验证最后一个分片有效性</value>
</data>
<data name="parsingStream" xml:space="preserve">
<value>正在解析媒体信息...</value>
</data>
<data name="keyProcessorNotFound" xml:space="preserve">
<value>找不到支持的Processor</value>
</data>
<data name="startDownloading" xml:space="preserve">
<value>开始下载...</value>
</data>
<data name="segmentCountCheckNotPass" xml:space="preserve">
<value>分片数量校验不通过, 共{}个,已下载{}.</value>
</data>
<data name="fixingVTT" xml:space="preserve">
<value>正在提取VTT(raw)字幕...</value>
</data>
<data name="fixingVTTmp4" xml:space="preserve">
<value>正在提取VTT(mp4)字幕...</value>
</data>
<data name="binaryMerge" xml:space="preserve">
<value>二进制合并中...</value>
</data>
<data name="fixingTTMLmp4" xml:space="preserve">
<value>正在提取TTML(mp4)字幕...</value>
</data>
<data name="fixingTTML" xml:space="preserve">
<value>正在提取TTML(raw)字幕...</value>
</data>
<data name="cmd_Input" xml:space="preserve">
<value>链接或文件</value>
</data>
<data name="cmd_header" xml:space="preserve">
<value>为HTTP请求设置特定的请求头, 例如:
-H "Cookie: mycookie" -H "User-Agent: iOS"</value>
</data>
<data name="cmd_logLevel" xml:space="preserve">
<value>设置日志级别</value>
</data>
<data name="cmd_autoSelect" xml:space="preserve">
<value>自动选择所有类型的最佳轨道</value>
</data>
<data name="cmd_subOnly" xml:space="preserve">
<value>只选取字幕轨道</value>
</data>
<data name="cmd_threadCount" xml:space="preserve">
<value>设置下载线程数</value>
</data>
<data name="cmd_skipMerge" xml:space="preserve">
<value>跳过合并分片</value>
</data>
<data name="cmd_binaryMerge" xml:space="preserve">
<value>二进制合并</value>
</data>
<data name="cmd_delAfterDone" xml:space="preserve">
<value>完成后删除临时文件</value>
</data>
<data name="cmd_subtitleFix" xml:space="preserve">
<value>自动修正字幕</value>
</data>
<data name="cmd_checkSegmentsCount" xml:space="preserve">
<value>检测实际下载的分片数量和预期数量是否匹配</value>
</data>
<data name="cmd_subFormat" xml:space="preserve">
<value>字幕输出类型</value>
</data>
<data name="cmd_tmpDir" xml:space="preserve">
<value>设置临时文件存储目录</value>
</data>
<data name="cmd_saveDir" xml:space="preserve">
<value>设置输出目录</value>
</data>
<data name="cmd_saveName" xml:space="preserve">
<value>设置保存文件名</value>
</data>
<data name="cmd_uiLanguage" xml:space="preserve">
<value>设置UI语言</value>
</data>
<data name="cmd_skipDownload" xml:space="preserve">
<value>跳过下载</value>
</data>
<data name="cmd_writeMetaJson" xml:space="preserve">
<value>解析后的信息是否输出json文件</value>
</data>
<data name="cmd_appendUrlParams" xml:space="preserve">
<value>将输入Url的Params添加至分片, 对某些网站很有用, 例如 kakao.com</value>
</data>
<data name="cmd_savePattern" xml:space="preserve">
<value>设置保存文件命名模板, 支持使用变量</value>
</data>
<data name="cmd_keys" xml:space="preserve">
<value>设置解密密钥, 程序调用mp4decrpyt/shaka-packager进行解密. 格式:
--key KID1:KEY1 --key KID2:KEY2</value>
</data>
<data name="cmd_urlProcessorArgs" xml:space="preserve">
<value>此字符串将直接传递给URL Processor</value>
</data>
<data name="cmd_MP4RealTimeDecryption" xml:space="preserve">
<value>实时解密MP4分片</value>
</data>
<data name="cmd_useShakaPackager" xml:space="preserve">
<value>使用shaka-packager替代mp4decrypt</value>
</data>
<data name="cmd_decryptionBinaryPath" xml:space="preserve">
<value>MP4解密所用工具的全路径, 例如 C:\Tools\mp4decrypt.exe</value>
</data>
<data name="cmd_loadKeyFailed" xml:space="preserve">
<value>获取KEY失败忽略读取.</value>
</data>
<data name="autoBinaryMerge" xml:space="preserve">
<value>检测到fMP4自动开启二进制合并</value>
</data>
<data name="cmd_ffmpegBinaryPath" xml:space="preserve">
<value>ffmpeg可执行程序全路径, 例如 C:\Tools\ffmpeg.exe</value>
</data>
<data name="ffmpegMerge" xml:space="preserve">
<value>调用ffmpeg合并中...</value>
</data>
<data name="cmd_keyText" xml:space="preserve">
<value>设置密钥文件,程序将从文件中按KID搜寻KEY以解密.(不建议使用特大文件)</value>
</data>
<data name="searchKey" xml:space="preserve">
<value>正在尝试从文本文件搜索KEY...</value>
</data>
<data name="ffmpegNotFound" xml:space="preserve">
<value>找不到ffmpeg请自行下载https://ffmpeg.org/download.html</value>
</data>
<data name="readingInfo" xml:space="preserve">
<value>读取媒体信息...</value>
</data>
<data name="autoBinaryMerge2" xml:space="preserve">
<value>检测到杜比视界内容,自动开启二进制合并</value>
</data>
<data name="autoBinaryMerge3" xml:space="preserve">
<value>检测到无法识别的加密方式,自动开启二进制合并</value>
</data>
</root>

View File

@ -1,276 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 1.3
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">1.3</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1">this is my long string</data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
[base64 mime encoded serialized .NET Framework object]
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
[base64 mime encoded string representing a byte array form of the .NET Framework object]
</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="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>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="badM3u8" xml:space="preserve">
<value>錯誤的m3u8</value>
</data>
<data name="notSupported" xml:space="preserve">
<value>當前輸入不受支援: </value>
</data>
<data name="loadingUrl" xml:space="preserve">
<value>載入URL: </value>
</data>
<data name="matchHLS" xml:space="preserve">
<value>內容匹配: [white on deepskyblue1]HTTP Live Streaming[/]</value>
</data>
<data name="masterM3u8Found" xml:space="preserve">
<value>檢測到Master列表開始解析全部流訊息</value>
</data>
<data name="fetch" xml:space="preserve">
<value>獲取: </value>
</data>
<data name="promptTitle" xml:space="preserve">
<value>請選擇 [green]你要下載的內容[/]:</value>
</data>
<data name="promptChoiceText" xml:space="preserve">
<value>[grey](按鍵盤上下鍵以瀏覽更多內容)[/]</value>
</data>
<data name="promptInfo" xml:space="preserve">
<value>(按 [blue]空格鍵[/] 選擇流, [green]確認鍵[/] 完成選擇)</value>
</data>
<data name="streamsInfo" xml:space="preserve">
<value>已解析, 共計 {} 條媒體流, 基本流 {} 條, 可選音頻流 {} 條, 可選字幕流 {} 條</value>
</data>
<data name="liveFound" xml:space="preserve">
<value>檢測到直播流</value>
</data>
<data name="selectedStream" xml:space="preserve">
<value>已選擇的流:</value>
</data>
<data name="writeJson" xml:space="preserve">
<value>寫出meta.json</value>
</data>
<data name="matchDASH" xml:space="preserve">
<value>內容匹配: [white on mediumorchid1]Dynamic Adaptive Streaming over HTTP[/]</value>
</data>
<data name="checkingLast" xml:space="preserve">
<value>驗證最後一個分片有效性</value>
</data>
<data name="parsingStream" xml:space="preserve">
<value>正在解析媒體信息...</value>
</data>
<data name="keyProcessorNotFound" xml:space="preserve">
<value>找不到支持的Processor</value>
</data>
<data name="startDownloading" xml:space="preserve">
<value>開始下載...</value>
</data>
<data name="segmentCountCheckNotPass" xml:space="preserve">
<value>分片數量校驗不通過, 共{}個,已下載{}.</value>
</data>
<data name="fixingVTT" xml:space="preserve">
<value>正在提取VTT(raw)字幕...</value>
</data>
<data name="fixingVTTmp4" xml:space="preserve">
<value>正在提取VTT(mp4)字幕...</value>
</data>
<data name="binaryMerge" xml:space="preserve">
<value>二進位制合併中...</value>
</data>
<data name="fixingTTMLmp4" xml:space="preserve">
<value>正在提取TTML(mp4)字幕...</value>
</data>
<data name="fixingTTML" xml:space="preserve">
<value>正在提取TTML(raw)字幕...</value>
</data>
<data name="cmd_Input" xml:space="preserve">
<value>連結或文件</value>
</data>
<data name="cmd_header" xml:space="preserve">
<value>為HTTP請求設置特定的請求頭, 例如:
-H "Cookie: mycookie" -H "User-Agent: iOS"</value>
</data>
<data name="cmd_logLevel" xml:space="preserve">
<value>設置日誌級別</value>
</data>
<data name="cmd_autoSelect" xml:space="preserve">
<value>自動選擇所有類型的最佳軌道</value>
</data>
<data name="cmd_subOnly" xml:space="preserve">
<value>只選取字幕軌道</value>
</data>
<data name="cmd_threadCount" xml:space="preserve">
<value>設置下載執行緒數</value>
</data>
<data name="cmd_skipMerge" xml:space="preserve">
<value>跳過合併分片</value>
</data>
<data name="cmd_binaryMerge" xml:space="preserve">
<value>二進位制合併</value>
</data>
<data name="cmd_delAfterDone" xml:space="preserve">
<value>完成後刪除臨時文件</value>
</data>
<data name="cmd_subtitleFix" xml:space="preserve">
<value>自動修正字幕</value>
</data>
<data name="cmd_checkSegmentsCount" xml:space="preserve">
<value>檢測實際下載的分片數量和預期數量是否匹配</value>
</data>
<data name="cmd_subFormat" xml:space="preserve">
<value>字幕輸出類型</value>
</data>
<data name="cmd_tmpDir" xml:space="preserve">
<value>設置臨時文件儲存目錄</value>
</data>
<data name="cmd_saveDir" xml:space="preserve">
<value>設置輸出目錄</value>
</data>
<data name="cmd_saveName" xml:space="preserve">
<value>設置保存檔案名</value>
</data>
<data name="cmd_uiLanguage" xml:space="preserve">
<value>設置UI語言</value>
</data>
<data name="cmd_skipDownload" xml:space="preserve">
<value>跳過下載</value>
</data>
<data name="cmd_writeMetaJson" xml:space="preserve">
<value>解析後的訊息是否輸出json文件</value>
</data>
<data name="cmd_appendUrlParams" xml:space="preserve">
<value>將輸入Url的Params添加至分片, 對某些網站很有用, 例如 kakao.com</value>
</data>
<data name="cmd_keys" xml:space="preserve">
<value>設置解密密鑰, 程序調用mp4decrpyt/shaka-packager進行解密. 格式:
--key KID1:KEY1 --key KID2:KEY2</value>
</data>
<data name="cmd_urlProcessorArgs" xml:space="preserve">
<value>此字符串將直接傳遞給URL Processor</value>
</data>
<data name="cmd_MP4RealTimeDecryption" xml:space="preserve">
<value>即時解密MP4分片</value>
</data>
<data name="cmd_useShakaPackager" xml:space="preserve">
<value>使用shaka-packager替代mp4decrypt</value>
</data>
<data name="cmd_decryptionBinaryPath" xml:space="preserve">
<value>MP4解密所用工具的全路徑, 例如 C:\Tools\mp4decrypt.exe</value>
</data>
<data name="cmd_loadKeyFailed" xml:space="preserve">
<value>獲取KEY失敗忽略讀取.</value>
</data>
<data name="autoBinaryMerge" xml:space="preserve">
<value>檢測到fMP4自動開啟二進位制合併</value>
</data>
<data name="cmd_ffmpegBinaryPath" xml:space="preserve">
<value>ffmpeg可執行程序全路徑, 例如 C:\Tools\ffmpeg.exe</value>
</data>
<data name="ffmpegMerge" xml:space="preserve">
<value>調用ffmpeg合併中...</value>
</data>
<data name="cmd_keyText" xml:space="preserve">
<value>設置密鑰文件,程序將從文件中按KID搜尋KEY以解密.(不建議使用特大文件)</value>
</data>
<data name="searchKey" xml:space="preserve">
<value>正在嘗試從文本文件搜尋KEY...</value>
</data>
<data name="ffmpegNotFound" xml:space="preserve">
<value>找不到ffmpeg請自行下載https://ffmpeg.org/download.html</value>
</data>
<data name="readingInfo" xml:space="preserve">
<value>讀取媒體訊息...</value>
</data>
<data name="autoBinaryMerge2" xml:space="preserve">
<value>檢測到杜比視界內容,自動開啟二進位制合併</value>
</data>
<data name="autoBinaryMerge3" xml:space="preserve">
<value>檢測到無法識別的加密方式,自動開啟二進位制合併</value>
</data>
</root>

View File

@ -0,0 +1,370 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace N_m3u8DL_RE.Common.Resource
{
internal class StaticText
{
public static Dictionary<string, TextContainer> LANG_DIC = new()
{
["autoBinaryMerge"] = new TextContainer
(
zhCN: "检测到fMP4自动开启二进制合并",
zhTW: "檢測到fMP4自動開啟二進位制合併",
enUS: "fMP4 is detected, binary merging is automatically enabled"
),
["autoBinaryMerge2"] = new TextContainer
(
zhCN: "检测到杜比视界内容,自动开启二进制合并",
zhTW: "檢測到杜比視界內容,自動開啟二進位制合併",
enUS: "Dolby Vision content is detected, binary merging is automatically enabled"
),
["autoBinaryMerge3"] = new TextContainer
(
zhCN: "检测到无法识别的加密方式,自动开启二进制合并",
zhTW: "檢測到無法識別的加密方式,自動開啟二進位制合併",
enUS: "An unrecognized encryption method is detected, binary merging is automatically enabled"
),
["badM3u8"] = new TextContainer
(
zhCN: "错误的m3u8",
zhTW: "錯誤的m3u8",
enUS: "Bad m3u8"
),
["binaryMerge"] = new TextContainer
(
zhCN: "二进制合并中...",
zhTW: "二進位制合併中...",
enUS: "Binary merging..."
),
["checkingLast"] = new TextContainer
(
zhCN: "验证最后一个分片有效性",
zhTW: "驗證最後一個分片有效性",
enUS: "Verifying the validity of the last segment"
),
["cmd_appendUrlParams"] = new TextContainer
(
zhCN: "将输入Url的Params添加至分片, 对某些网站很有用, 例如 kakao.com",
zhTW: "將輸入Url的Params添加至分片, 對某些網站很有用, 例如 kakao.com",
enUS: "Add Params of input Url to segments, useful for some websites, such as kakao.com"
),
["cmd_autoSelect"] = new TextContainer
(
zhCN: "自动选择所有类型的最佳轨道",
zhTW: "自動選擇所有類型的最佳軌道",
enUS: "Automatically selects the best tracks of all types"
),
["cmd_binaryMerge"] = new TextContainer
(
zhCN: "二进制合并",
zhTW: "二進位制合併",
enUS: "Binary merge"
),
["cmd_checkSegmentsCount"] = new TextContainer
(
zhCN: "检测实际下载的分片数量和预期数量是否匹配",
zhTW: "檢測實際下載的分片數量和預期數量是否匹配",
enUS: "Check if the actual number of segments downloaded matches the expected number"
),
["cmd_decryptionBinaryPath"] = new TextContainer
(
zhCN: "MP4解密所用工具的全路径, 例如 C:\\Tools\\mp4decrypt.exe",
zhTW: "MP4解密所用工具的全路徑, 例如 C:\\Tools\\mp4decrypt.exe",
enUS: "Full path to the tool used for MP4 decryption, like C:\\Tools\\mp4decrypt.exe"
),
["cmd_delAfterDone"] = new TextContainer
(
zhCN: "完成后删除临时文件",
zhTW: "完成後刪除臨時文件",
enUS: "Delete temporary files when done"
),
["cmd_ffmpegBinaryPath"] = new TextContainer
(
zhCN: "ffmpeg可执行程序全路径, 例如 C:\\Tools\\ffmpeg.exe",
zhTW: "ffmpeg可執行程序全路徑, 例如 C:\\Tools\\ffmpeg.exe",
enUS: "Full path to the ffmpeg binary, like C:\\Tools\\ffmpeg.exe"
),
["cmd_header"] = new TextContainer
(
zhCN: "为HTTP请求设置特定的请求头, 例如:\r\n-H \"Cookie: mycookie\" -H \"User-Agent: iOS\"",
zhTW: "為HTTP請求設置特定的請求頭, 例如:\r\n-H \"Cookie: mycookie\" -H \"User-Agent: iOS\"",
enUS: "Pass custom header(s) to server, Example:\r\n-H \"Cookie: mycookie\" -H \"User-Agent: iOS\""
),
["cmd_Input"] = new TextContainer
(
zhCN: "链接或文件",
zhTW: "連結或文件",
enUS: "Input Url or File"
),
["cmd_keys"] = new TextContainer
(
zhCN: "设置解密密钥, 程序调用mp4decrpyt/shaka-packager进行解密. 格式:\r\n--key KID1:KEY1 --key KID2:KEY2",
zhTW: "設置解密密鑰, 程序調用mp4decrpyt/shaka-packager進行解密. 格式:\r\n--key KID1:KEY1 --key KID2:KEY2",
enUS: "Pass decryption key(s) to mp4decrypt/shaka-packager. format:\r\n--key KID1:KEY1 --key KID2:KEY2"
),
["cmd_keyText"] = new TextContainer
(
zhCN: "设置密钥文件,程序将从文件中按KID搜寻KEY以解密.(不建议使用特大文件)",
zhTW: "設置密鑰文件,程序將從文件中按KID搜尋KEY以解密.(不建議使用特大文件)",
enUS: "Set the kid-key file, the program will search the KEY with KID from the file.(Very large file are not recommended)"
),
["cmd_loadKeyFailed"] = new TextContainer
(
zhCN: "获取KEY失败忽略读取.",
zhTW: "獲取KEY失敗忽略讀取.",
enUS: "Failed to get KEY, ignore."
),
["cmd_logLevel"] = new TextContainer
(
zhCN: "设置日志级别",
zhTW: "設置日誌級別",
enUS: "Set log level"
),
["cmd_MP4RealTimeDecryption"] = new TextContainer
(
zhCN: "实时解密MP4分片",
zhTW: "即時解密MP4分片",
enUS: "Decrypt MP4 segments in real time"
),
["cmd_saveDir"] = new TextContainer
(
zhCN: "设置输出目录",
zhTW: "設置輸出目錄",
enUS: "Set output directory"
),
["cmd_saveName"] = new TextContainer
(
zhCN: "设置保存文件名",
zhTW: "設置保存檔案名",
enUS: "Set output filename"
),
["cmd_savePattern"] = new TextContainer
(
zhCN: "设置保存文件命名模板, 支持使用变量",
zhTW: "",
enUS: ""
),
["cmd_skipDownload"] = new TextContainer
(
zhCN: "跳过下载",
zhTW: "跳過下載",
enUS: "Skip download"
),
["cmd_skipMerge"] = new TextContainer
(
zhCN: "跳过合并分片",
zhTW: "跳過合併分片",
enUS: "Skip segments merge"
),
["cmd_subFormat"] = new TextContainer
(
zhCN: "字幕输出类型",
zhTW: "字幕輸出類型",
enUS: "Subtitle output format"
),
["cmd_subOnly"] = new TextContainer
(
zhCN: "只选取字幕轨道",
zhTW: "只選取字幕軌道",
enUS: "Select only subtitle tracks"
),
["cmd_subtitleFix"] = new TextContainer
(
zhCN: "自动修正字幕",
zhTW: "自動修正字幕",
enUS: "Automatically fix subtitles"
),
["cmd_threadCount"] = new TextContainer
(
zhCN: "设置下载线程数",
zhTW: "設置下載執行緒數",
enUS: "Set download thread count"
),
["cmd_tmpDir"] = new TextContainer
(
zhCN: "设置临时文件存储目录",
zhTW: "設置臨時文件儲存目錄",
enUS: "Set temporary file directory"
),
["cmd_uiLanguage"] = new TextContainer
(
zhCN: "设置UI语言 (zh-CN, zh-TW, en-US)",
zhTW: "設置UI語言 (zh-CN, zh-TW, en-US)",
enUS: "Set UI language (zh-CN, zh-TW, en-US)"
),
["cmd_urlProcessorArgs"] = new TextContainer
(
zhCN: "此字符串将直接传递给URL Processor",
zhTW: "此字符串將直接傳遞給URL Processor",
enUS: "Give these arguments to the URL Processors."
),
["cmd_useShakaPackager"] = new TextContainer
(
zhCN: "使用shaka-packager替代mp4decrypt",
zhTW: "使用shaka-packager替代mp4decrypt",
enUS: "Use shaka-packager instead of mp4decrypt"
),
["cmd_writeMetaJson"] = new TextContainer
(
zhCN: "解析后的信息是否输出json文件",
zhTW: "解析後的訊息是否輸出json文件",
enUS: "Write meta json after parsed"
),
["fetch"] = new TextContainer
(
zhCN: "获取: ",
zhTW: "獲取: ",
enUS: "Fetch: "
),
["ffmpegMerge"] = new TextContainer
(
zhCN: "调用ffmpeg合并中...",
zhTW: "調用ffmpeg合併中...",
enUS: "ffmpeg merging..."
),
["ffmpegNotFound"] = new TextContainer
(
zhCN: "找不到ffmpeg请自行下载https://ffmpeg.org/download.html",
zhTW: "找不到ffmpeg請自行下載https://ffmpeg.org/download.html",
enUS: "ffmpeg not found, please download at: https://ffmpeg.org/download.html"
),
["fixingTTML"] = new TextContainer
(
zhCN: "正在提取TTML(raw)字幕...",
zhTW: "正在提取TTML(raw)字幕...",
enUS: "Extracting TTML(raw) subtitle..."
),
["fixingTTMLmp4"] = new TextContainer
(
zhCN: "正在提取TTML(mp4)字幕...",
zhTW: "正在提取TTML(mp4)字幕...",
enUS: "Extracting TTML(mp4) subtitle..."
),
["fixingVTT"] = new TextContainer
(
zhCN: "正在提取VTT(raw)字幕...",
zhTW: "正在提取VTT(raw)字幕...",
enUS: "Extracting VTT(raw) subtitle..."
),
["fixingVTTmp4"] = new TextContainer
(
zhCN: "正在提取VTT(mp4)字幕...",
zhTW: "正在提取VTT(mp4)字幕...",
enUS: "Extracting VTT(mp4) subtitle..."
),
["keyProcessorNotFound"] = new TextContainer
(
zhCN: "找不到支持的Processor",
zhTW: "找不到支持的Processor",
enUS: "No Processor matched"
),
["liveFound"] = new TextContainer
(
zhCN: "检测到直播流",
zhTW: "檢測到直播流",
enUS: "Live stream found"
),
["loadingUrl"] = new TextContainer
(
zhCN: "加载URL: ",
zhTW: "載入URL: ",
enUS: "Loading URL: "
),
["masterM3u8Found"] = new TextContainer
(
zhCN: "检测到Master列表开始解析全部流信息",
zhTW: "檢測到Master列表開始解析全部流訊息",
enUS: "Master List detected, try parse all streams"
),
["matchDASH"] = new TextContainer
(
zhCN: "内容匹配: [white on mediumorchid1]Dynamic Adaptive Streaming over HTTP[/]",
zhTW: "內容匹配: [white on mediumorchid1]Dynamic Adaptive Streaming over HTTP[/]",
enUS: "Content Matched: [white on mediumorchid1]Dynamic Adaptive Streaming over HTTP[/]"
),
["matchHLS"] = new TextContainer
(
zhCN: "内容匹配: [white on deepskyblue1]HTTP Live Streaming[/]",
zhTW: "內容匹配: [white on deepskyblue1]HTTP Live Streaming[/]",
enUS: "Content Matched: [white on deepskyblue1]HTTP Live Streaming[/]"
),
["notSupported"] = new TextContainer
(
zhCN: "当前输入不受支持: ",
zhTW: "當前輸入不受支援: ",
enUS: "Input not supported: "
),
["parsingStream"] = new TextContainer
(
zhCN: "正在解析媒体信息...",
zhTW: "正在解析媒體信息...",
enUS: "Parsing streams..."
),
["promptChoiceText"] = new TextContainer
(
zhCN: "[grey](按键盘上下键以浏览更多内容)[/]",
zhTW: "[grey](按鍵盤上下鍵以瀏覽更多內容)[/]",
enUS: "[grey](Move up and down to reveal more streams)[/]"
),
["promptInfo"] = new TextContainer
(
zhCN: "(按 [blue]空格键[/] 选择流, [green]回车键[/] 完成选择)",
zhTW: "(按 [blue]空格鍵[/] 選擇流, [green]確認鍵[/] 完成選擇)",
enUS: "(Press [blue]<space>[/] to toggle a stream, [green]<enter>[/] to accept)"
),
["promptTitle"] = new TextContainer
(
zhCN: "请选择 [green]你要下载的内容[/]:",
zhTW: "請選擇 [green]你要下載的內容[/]:",
enUS: "Please select [green]what you want to download[/]:"
),
["readingInfo"] = new TextContainer
(
zhCN: "读取媒体信息...",
zhTW: "讀取媒體訊息...",
enUS: "Reading media info..."
),
["searchKey"] = new TextContainer
(
zhCN: "正在尝试从文本文件搜索KEY...",
zhTW: "正在嘗試從文本文件搜尋KEY...",
enUS: "Trying to search for KEY from text file..."
),
["segmentCountCheckNotPass"] = new TextContainer
(
zhCN: "分片数量校验不通过, 共{}个,已下载{}.",
zhTW: "分片數量校驗不通過, 共{}個,已下載{}.",
enUS: "Segment count check not pass, total: {}, downloaded: {}."
),
["selectedStream"] = new TextContainer
(
zhCN: "已选择的流:",
zhTW: "已選擇的流:",
enUS: "Selected streams:"
),
["startDownloading"] = new TextContainer
(
zhCN: "开始下载...",
zhTW: "開始下載...",
enUS: "Start downloading..."
),
["streamsInfo"] = new TextContainer
(
zhCN: "已解析, 共计 {} 条媒体流, 基本流 {} 条, 可选音频流 {} 条, 可选字幕流 {} 条",
zhTW: "已解析, 共計 {} 條媒體流, 基本流 {} 條, 可選音頻流 {} 條, 可選字幕流 {} 條",
enUS: "Extracted, there are {} streams, with {} basic streams, {} audio streams, {} subtitle streams"
),
["writeJson"] = new TextContainer
(
zhCN: "写出meta json",
zhTW: "寫出meta json",
enUS: "Writing meta json"
),
};
}
}

View File

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace N_m3u8DL_RE.Common.Resource
{
internal class TextContainer
{
public string ZH_CN { get; set; }
public string ZH_TW { get; set; }
public string EN_US { get; set; }
public TextContainer(string zhCN, string zhTW, string enUS)
{
ZH_CN = zhCN;
ZH_TW = zhTW;
EN_US = enUS;
}
}
}

View File

@ -35,7 +35,7 @@ namespace N_m3u8DL_RE.Common.Util
{
return JsonSerializer.Serialize(sList, Context.ListStreamSpec);
}
return JsonSerializer.Serialize(o, Options);
return "{NOT SUPPORTED}";
}
//此函数用于格式化输出时长

View File

@ -4,10 +4,10 @@ using N_m3u8DL_RE.Enum;
using System.CommandLine;
using System.CommandLine.Binding;
using System.Globalization;
using System.Linq;
namespace N_m3u8DL_RE.CommandLine
{
internal class CommandInvoker
{
private readonly static Argument<string> Input = new(name: "input", description: ResString.cmd_Input);
@ -73,20 +73,14 @@ namespace N_m3u8DL_RE.CommandLine
KeyTextFile = bindingContext.ParseResult.GetValueForOption(KeyTextFile),
};
//在这里设置语言
string loc = "en-US";
string currLoc = Thread.CurrentThread.CurrentUICulture.Name;
if (currLoc == "zh-CN" || currLoc == "zh-SG") loc = "zh-Hans";
else if (currLoc.StartsWith("zh-")) loc = "zh-Hant";
//以用户选择优先
loc = option.UILanguage ?? loc;
CultureInfo.DefaultThreadCurrentCulture = new CultureInfo(loc);
Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(loc);
Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo(loc);
ResString.Culture = CultureInfo.GetCultureInfo(loc);
//以用户选择语言为准优先
if (option.UILanguage != null && new List<string> { "en-US", "zh-CN", "zh-TW" }.Contains(option.UILanguage))
{
CultureInfo.DefaultThreadCurrentCulture = new CultureInfo(option.UILanguage);
Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(option.UILanguage);
Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo(option.UILanguage);
}
return option;
}

View File

@ -8,8 +8,7 @@
<TrimmerDefaultAction>link</TrimmerDefaultAction>
<IlcTrimMetadata>true</IlcTrimMetadata>
<IlcGenerateStackTraceData>false</IlcGenerateStackTraceData>
<UseSystemResourceKeys>true</UseSystemResourceKeys>
<SatelliteResourceLanguages>zh-Hans;zh-Hant;en-US</SatelliteResourceLanguages>
<SatelliteResourceLanguages>zh-CN;zh-TW;en-US</SatelliteResourceLanguages>
<NativeAotCompilerVersion>7.0.0-*</NativeAotCompilerVersion>
</PropertyGroup>

View File

@ -1,26 +1,18 @@
using N_m3u8DL_RE.Parser.Config;
using N_m3u8DL_RE.Common.Entity;
using N_m3u8DL_RE.Common.Enum;
using N_m3u8DL_RE.Parser.Util;
using N_m3u8DL_RE.Parser;
using Spectre.Console;
using System.Text.Json;
using System.Text.Json.Serialization;
using N_m3u8DL_RE.Common.Resource;
using N_m3u8DL_RE.Common.Log;
using System.Globalization;
using System.Text;
using System.Text.RegularExpressions;
using System.Collections.Concurrent;
using N_m3u8DL_RE.Common.Util;
using N_m3u8DL_RE.Processor;
using N_m3u8DL_RE.Downloader;
using N_m3u8DL_RE.Config;
using N_m3u8DL_RE.Util;
using System.Diagnostics;
using N_m3u8DL_RE.DownloadManager;
using N_m3u8DL_RE.CommandLine;
using System.Reflection;
namespace N_m3u8DL_RE
{
@ -28,6 +20,24 @@ namespace N_m3u8DL_RE
{
static async Task Main(string[] args)
{
string loc = "en-US";
string currLoc = Thread.CurrentThread.CurrentUICulture.Name;
if (currLoc == "zh-CN" || currLoc == "zh-SG") loc = "zh-CN";
else if (currLoc.StartsWith("zh-")) loc = "zh-TW";
//处理用户-h等请求
var index = -1;
var list = new List<string>(args);
if ((index = list.IndexOf("--ui-language")) != -1 && list.Count > index + 1 && new List<string> { "en-US", "zh-CN", "zh-TW" }.Contains(list[index + 1]))
{
Console.WriteLine(111);
loc = list[index + 1];
}
CultureInfo.DefaultThreadCurrentCulture = new CultureInfo(loc);
Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(loc);
Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo(loc);
await CommandInvoker.InvokeArgs(args, DoWorkAsync);
}