增加第三方工具的下载地址提示 (#525)
This commit is contained in:
parent
bc8b5a92a9
commit
cacf9b0ff0
|
@ -105,6 +105,9 @@ public static class ResString
|
||||||
public static string fetch => GetText("fetch");
|
public static string fetch => GetText("fetch");
|
||||||
public static string ffmpegMerge => GetText("ffmpegMerge");
|
public static string ffmpegMerge => GetText("ffmpegMerge");
|
||||||
public static string ffmpegNotFound => GetText("ffmpegNotFound");
|
public static string ffmpegNotFound => GetText("ffmpegNotFound");
|
||||||
|
public static string mkvmergeNotFound => GetText("mkvmergeNotFound");
|
||||||
|
public static string mp4decryptNotFound => GetText("mp4decryptNotFound");
|
||||||
|
public static string shakaPackagerNotFound => GetText("shakaPackagerNotFound");
|
||||||
public static string fixingTTML => GetText("fixingTTML");
|
public static string fixingTTML => GetText("fixingTTML");
|
||||||
public static string fixingTTMLmp4 => GetText("fixingTTMLmp4");
|
public static string fixingTTMLmp4 => GetText("fixingTTMLmp4");
|
||||||
public static string fixingVTT => GetText("fixingVTT");
|
public static string fixingVTT => GetText("fixingVTT");
|
||||||
|
|
|
@ -784,6 +784,24 @@ internal class StaticText
|
||||||
zhTW: "找不到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"
|
enUS: "ffmpeg not found, please download at: https://ffmpeg.org/download.html"
|
||||||
),
|
),
|
||||||
|
["mkvmergeNotFound"] = new TextContainer
|
||||||
|
(
|
||||||
|
zhCN: "找不到mkvmerge,请自行下载:https://mkvtoolnix.download/downloads.html",
|
||||||
|
zhTW: "找不到mkvmerge,請自行下載:https://mkvtoolnix.download/downloads.html",
|
||||||
|
enUS: "mkvmerge not found, please download at: https://mkvtoolnix.download/downloads.html"
|
||||||
|
),
|
||||||
|
["shakaPackagerNotFound"] = new TextContainer
|
||||||
|
(
|
||||||
|
zhCN: "找不到shaka-packager,请自行下载:https://github.com/shaka-project/shaka-packager/releases",
|
||||||
|
zhTW: "找不到shaka-packager,請自行下載:https://github.com/shaka-project/shaka-packager/releases",
|
||||||
|
enUS: "shaka-packager not found, please download at: https://github.com/shaka-project/shaka-packager/releases"
|
||||||
|
),
|
||||||
|
["mp4decryptNotFound"] = new TextContainer
|
||||||
|
(
|
||||||
|
zhCN: "找不到mp4decrypt,请自行下载:https://www.bento4.com/downloads/",
|
||||||
|
zhTW: "找不到mp4decrypt,請自行下載:https://www.bento4.com/downloads/",
|
||||||
|
enUS: "mp4decrypt not found, please download at: https://www.bento4.com/downloads/"
|
||||||
|
),
|
||||||
["fixingTTML"] = new TextContainer
|
["fixingTTML"] = new TextContainer
|
||||||
(
|
(
|
||||||
zhCN: "正在提取TTML(raw)字幕...",
|
zhCN: "正在提取TTML(raw)字幕...",
|
||||||
|
|
|
@ -139,7 +139,7 @@ internal class Program
|
||||||
option.MkvmergeBinaryPath ??= GlobalUtil.FindExecutable("mkvmerge");
|
option.MkvmergeBinaryPath ??= GlobalUtil.FindExecutable("mkvmerge");
|
||||||
if (string.IsNullOrEmpty(option.MkvmergeBinaryPath) || !File.Exists(option.MkvmergeBinaryPath))
|
if (string.IsNullOrEmpty(option.MkvmergeBinaryPath) || !File.Exists(option.MkvmergeBinaryPath))
|
||||||
{
|
{
|
||||||
throw new FileNotFoundException("mkvmerge not found");
|
throw new FileNotFoundException(ResString.mkvmergeNotFound);
|
||||||
}
|
}
|
||||||
Logger.Extra($"mkvmerge => {option.MkvmergeBinaryPath}");
|
Logger.Extra($"mkvmerge => {option.MkvmergeBinaryPath}");
|
||||||
}
|
}
|
||||||
|
@ -155,14 +155,14 @@ internal class Program
|
||||||
var file2 = GlobalUtil.FindExecutable("packager-linux-x64");
|
var file2 = GlobalUtil.FindExecutable("packager-linux-x64");
|
||||||
var file3 = GlobalUtil.FindExecutable("packager-osx-x64");
|
var file3 = GlobalUtil.FindExecutable("packager-osx-x64");
|
||||||
var file4 = GlobalUtil.FindExecutable("packager-win-x64");
|
var file4 = GlobalUtil.FindExecutable("packager-win-x64");
|
||||||
if (file == null && file2 == null && file3 == null && file4 == null) throw new FileNotFoundException("shaka-packager not found!");
|
if (file == null && file2 == null && file3 == null && file4 == null) throw new FileNotFoundException(ResString.shakaPackagerNotFound);
|
||||||
option.DecryptionBinaryPath = file ?? file2 ?? file3 ?? file4;
|
option.DecryptionBinaryPath = file ?? file2 ?? file3 ?? file4;
|
||||||
Logger.Extra($"shaka-packager => {option.DecryptionBinaryPath}");
|
Logger.Extra($"shaka-packager => {option.DecryptionBinaryPath}");
|
||||||
}
|
}
|
||||||
else if (option.DecryptionEngine is DecryptEngine.MP4DECRYPT)
|
else if (option.DecryptionEngine is DecryptEngine.MP4DECRYPT)
|
||||||
{
|
{
|
||||||
var file = GlobalUtil.FindExecutable("mp4decrypt");
|
var file = GlobalUtil.FindExecutable("mp4decrypt");
|
||||||
if (file == null) throw new FileNotFoundException("mp4decrypt not found!");
|
if (file == null) throw new FileNotFoundException(ResString.mp4decryptNotFound);
|
||||||
option.DecryptionBinaryPath = file;
|
option.DecryptionBinaryPath = file;
|
||||||
Logger.Extra($"mp4decrypt => {option.DecryptionBinaryPath}");
|
Logger.Extra($"mp4decrypt => {option.DecryptionBinaryPath}");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue