diff --git a/Jvedio-WPF/Jvedio/Core/Config/ConfigManager.cs b/Jvedio-WPF/Jvedio/Core/Config/ConfigManager.cs index 49378496..51be5bea 100644 --- a/Jvedio-WPF/Jvedio/Core/Config/ConfigManager.cs +++ b/Jvedio-WPF/Jvedio/Core/Config/ConfigManager.cs @@ -14,7 +14,7 @@ namespace Jvedio { public static class ConfigManager { - public const string RELEASE_DATE = "2023-03-20"; + public const string RELEASE_DATE = "2023-03-26"; public static StartUp StartUp = StartUp.createInstance(); public static Core.WindowConfig.Main Main = Core.WindowConfig.Main.createInstance(); public static Filter Filter = Core.WindowConfig.Filter.createInstance(); diff --git a/Jvedio-WPF/Jvedio/Core/Config/PathManager.cs b/Jvedio-WPF/Jvedio/Core/Config/PathManager.cs index fa7bd73c..2485576a 100644 --- a/Jvedio-WPF/Jvedio/Core/Config/PathManager.cs +++ b/Jvedio-WPF/Jvedio/Core/Config/PathManager.cs @@ -1,4 +1,5 @@ -using System; +using SuperControls.Style.Windows; +using System; using System.IO; using System.Windows; @@ -60,7 +61,7 @@ public static void Init() } catch (Exception ex2) { - MessageBox.Show("数据目录创建失败 => " + ex2.Message); + MsgBox.Show("数据目录创建失败 => " + ex2.Message); App.Current.Shutdown(); } } diff --git a/Jvedio-WPF/Jvedio/Core/FFmpeg/ScreenShot.cs b/Jvedio-WPF/Jvedio/Core/FFmpeg/ScreenShot.cs index 8c51f217..bca2e5b1 100644 --- a/Jvedio-WPF/Jvedio/Core/FFmpeg/ScreenShot.cs +++ b/Jvedio-WPF/Jvedio/Core/FFmpeg/ScreenShot.cs @@ -181,11 +181,12 @@ public async Task AsyncGenrateGif() if (!File.Exists(originPath)) throw new NotFoundException(originPath); - string[] cutoffArray = MediaParse.GetCutOffArray(originPath, ConfigManager.FFmpegConfig.ScreenShotNum, ConfigManager.FFmpegConfig.ScreenShotIgnoreStart, ConfigManager.FFmpegConfig.ScreenShotIgnoreEnd); // 获得需要截图的视频进度 + string[] cutoffArray = MediaParse.GetCutOffArray(originPath, ConfigManager.FFmpegConfig.ScreenShotNum, + ConfigManager.FFmpegConfig.ScreenShotIgnoreStart, ConfigManager.FFmpegConfig.ScreenShotIgnoreEnd); // 获得需要截图的视频进度 if (cutoffArray.Length == 0) throw new MediaCutOutOfRangeException(); - string saveFileName = CurrentVideo.getGifPath(); + string saveFileName = CurrentVideo.GetGifPath(); if (string.IsNullOrEmpty(saveFileName)) throw new NotFoundException(saveFileName); diff --git a/Jvedio-WPF/Jvedio/Core/Logs/Logger.cs b/Jvedio-WPF/Jvedio/Core/Logs/Logger.cs index 705802e9..539f9080 100644 --- a/Jvedio-WPF/Jvedio/Core/Logs/Logger.cs +++ b/Jvedio-WPF/Jvedio/Core/Logs/Logger.cs @@ -88,7 +88,7 @@ public static void Error(Exception e) content += $"{Environment.NewLine}[StackTrace] {Environment.NewLine} {GetAllFootprints(e)}"; Console.WriteLine(content); - string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Log", "Error"); + string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "logs", "error"); if (!Directory.Exists(path)) Directory.CreateDirectory(path); string filepath = path + "/" + DateTime.Now.ToString("yyyy-MM-dd") + ".log"; @@ -112,7 +112,7 @@ private static void Log(LogType logType, string content) { string output = $"{DateHelper.Now()} => [{logType}] {content} {Environment.NewLine}"; Console.WriteLine(output); - string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Log"); + string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "logs"); if (!Directory.Exists(path)) { Directory.CreateDirectory(path); diff --git a/Jvedio-WPF/Jvedio/Core/Net/DownLoadTask.cs b/Jvedio-WPF/Jvedio/Core/Net/DownLoadTask.cs index 51743c54..3c69a28d 100644 --- a/Jvedio-WPF/Jvedio/Core/Net/DownLoadTask.cs +++ b/Jvedio-WPF/Jvedio/Core/Net/DownLoadTask.cs @@ -479,6 +479,9 @@ public override void DoWork() FinalizeWithCancel(); return; } + if (dict != null && dict.ContainsKey("PluginID") && dict["PluginID"] is string PluginID) + logger?.Info($"使用刮削器:{PluginID}"); + bool success = true; Progress = 10f; StatusText = "2. 校验信息"; diff --git a/Jvedio-WPF/Jvedio/Core/Net/VideoDownLoader.cs b/Jvedio-WPF/Jvedio/Core/Net/VideoDownLoader.cs index 6a6d9d23..3206b1c3 100644 --- a/Jvedio-WPF/Jvedio/Core/Net/VideoDownLoader.cs +++ b/Jvedio-WPF/Jvedio/Core/Net/VideoDownLoader.cs @@ -78,6 +78,7 @@ public async Task> GetInfo(Action head Header.Headers = dict; } headerCallBack?.Invoke(Header); + d.Add("PluginID", server.PluginID); return d; } } diff --git a/Jvedio-WPF/Jvedio/Entity/Data/Video.cs b/Jvedio-WPF/Jvedio/Entity/Data/Video.cs index 01cfee32..ae089a0a 100644 --- a/Jvedio-WPF/Jvedio/Entity/Data/Video.cs +++ b/Jvedio-WPF/Jvedio/Entity/Data/Video.cs @@ -468,7 +468,7 @@ public string GetScreenShot() return imagePath; } - public string getGifPath() + public string GetGifPath() { string imagePath = GetImagePath(ImageType.Gif, ".gif"); diff --git a/Jvedio-WPF/Jvedio/Reference/SuperControls.Style.dll b/Jvedio-WPF/Jvedio/Reference/SuperControls.Style.dll index a042e6c5..a5b55282 100644 Binary files a/Jvedio-WPF/Jvedio/Reference/SuperControls.Style.dll and b/Jvedio-WPF/Jvedio/Reference/SuperControls.Style.dll differ diff --git a/Jvedio-WPF/Jvedio/Reference/SuperUtils.dll b/Jvedio-WPF/Jvedio/Reference/SuperUtils.dll index 8526af55..e41cef44 100644 Binary files a/Jvedio-WPF/Jvedio/Reference/SuperUtils.dll and b/Jvedio-WPF/Jvedio/Reference/SuperUtils.dll differ diff --git a/Jvedio-WPF/Jvedio/Upgrade/Jvedio4ToJvedio5.cs b/Jvedio-WPF/Jvedio/Upgrade/Jvedio4ToJvedio5.cs index d7636744..45fc015b 100644 --- a/Jvedio-WPF/Jvedio/Upgrade/Jvedio4ToJvedio5.cs +++ b/Jvedio-WPF/Jvedio/Upgrade/Jvedio4ToJvedio5.cs @@ -6,6 +6,7 @@ using Jvedio.Mapper; using Jvedio.Windows; using Newtonsoft.Json; +using SuperControls.Style.Windows; using SuperUtils.Framework.ORM.Attributes; using SuperUtils.Framework.ORM.Utils; using SuperUtils.Framework.ORM.Wrapper; @@ -142,7 +143,7 @@ public static async Task MoveDatabases(string[] files) if (!File.Exists(file)) continue; result = await MoveOldData(file, (err) => { - MessageBox.Show(err); + MsgBox.Show(err); }); setProgress((100 * (float)i + 1) / (float)files.Length, $"迁移数据:{Path.GetFileName(file)}"); } diff --git a/Jvedio-WPF/Jvedio/ViewModels/VieModel_Main.cs b/Jvedio-WPF/Jvedio/ViewModels/VieModel_Main.cs index 4199edbc..1f11f4db 100644 --- a/Jvedio-WPF/Jvedio/ViewModels/VieModel_Main.cs +++ b/Jvedio-WPF/Jvedio/ViewModels/VieModel_Main.cs @@ -1960,8 +1960,20 @@ public void toLimit(IWrapper wrapper) { "RecentWatch", " " }, }; + + static bool g_showRelativeScreen = false; + + public void GenerateSelect(object o = null) { + if (!g_showRelativeScreen && + (PathType)ConfigManager.Settings.PicPathMode == PathType.RelativeToData) + { + g_showRelativeScreen = true; + MessageCard.Info("当前图片模式为相对于影片,如果影片都位于同一目录,图片将会重复/覆盖"); + } + + extraWrapper = new SelectWrapper