diff --git a/Program.cs b/Program.cs index bb6b735..103ea86 100644 --- a/Program.cs +++ b/Program.cs @@ -13,7 +13,7 @@ namespace dy.net private static readonly string DefaultListenUrl = "http://*:10101"; private const string SpaRootPath = "app/dist"; private const string SpaSourcePath = "app/"; - private const string SwaggerDocTitle = "dy.net WebApi Docs"; + private const string SwaggerDocTitle = "dysync.net WebApi Docs"; /// /// diff --git a/app/src/pages/set/AppSet.vue b/app/src/pages/set/AppSet.vue index 607cd81..2d94f32 100644 --- a/app/src/pages/set/AppSet.vue +++ b/app/src/pages/set/AppSet.vue @@ -200,6 +200,10 @@ H265 + + + + @@ -321,6 +325,7 @@ interface FormState { KeepDynamicVideo: boolean; // 补充原有缺失字段 OnlySyncNew: boolean; VideoEncoder: number; + CloseNfo:boolean; } // 表单初始数据 @@ -345,6 +350,7 @@ const formState: UnwrapRef = reactive({ KeepDynamicVideo: false, // 初始化缺失字段 OnlySyncNew: false, VideoEncoder: 264, + CloseNfo:false }); // 实时计算完整模板 @@ -419,6 +425,7 @@ const getConfig = () => { KeepDynamicVideo: res.data.keepDynamicVideo || false, // 补充赋值 OnlySyncNew: res.data.onlySyncNew, VideoEncoder: res.data.videoEncoder, + CloseNfo:res.data.closeNfo }); tagData.value = JSON.parse(res.data.priorityLevel || '[]'); diff --git a/job/DouyinBasicSyncJob.cs b/job/DouyinBasicSyncJob.cs index 9a5bd53..48d628c 100644 --- a/job/DouyinBasicSyncJob.cs +++ b/job/DouyinBasicSyncJob.cs @@ -687,11 +687,11 @@ namespace dy.net.job //动态视频生成nfo if (cate != null && (VideoType == VideoTypeEnum.dy_mix || VideoType == VideoTypeEnum.dy_series)) { - NfoFileGenerator.GenerateVideoNfoFile(dynamicVideo, cate.Name); + NfoFileGenerator.GenerateVideoNfoFile(config.CloseNfo,dynamicVideo, cate.Name); } else { - NfoFileGenerator.GenerateVideoNfoFile(dynamicVideo); + NfoFileGenerator.GenerateVideoNfoFile(config.CloseNfo, dynamicVideo); } videos.Add(dynamicVideo); syncCount++; @@ -1471,10 +1471,12 @@ namespace dy.net.job { if (cate != null && (VideoType == VideoTypeEnum.dy_mix || VideoType == VideoTypeEnum.dy_series)) { - NfoFileGenerator.GenerateVideoNfoFile(video, cate.Name); + NfoFileGenerator.GenerateVideoNfoFile(config.CloseNfo, video, cate.Name); + } + else + { + NfoFileGenerator.GenerateVideoNfoFile(config.CloseNfo, video); } - // 生成NFO文件,动态视频 合成后重新生成,不在这里生成nfo - NfoFileGenerator.GenerateVideoNfoFile(video); } return video; diff --git a/model/entity/AppConfig.cs b/model/entity/AppConfig.cs index 4a2afe3..da08a53 100644 --- a/model/entity/AppConfig.cs +++ b/model/entity/AppConfig.cs @@ -114,7 +114,12 @@ namespace dy.net.model.entity /// 264 265 0-默认0=264 /// [SugarColumn(IsNullable = true)] - public int? VideoEncoder { get; set; } + public int? VideoEncoder { get; set; } + /// + /// 是否不启用刮削 + /// + [SugarColumn(IsNullable = true)] + public bool CloseNfo { get; set; } } } diff --git a/utils/NfoFileGenerator.cs b/utils/NfoFileGenerator.cs index c4f0440..15bd275 100644 --- a/utils/NfoFileGenerator.cs +++ b/utils/NfoFileGenerator.cs @@ -16,11 +16,14 @@ namespace dy.net.utils /// 生成NFO文件 /// NFO文件包含视频的元数据信息,如标题、作者、封面等 /// + /// 是否关闭刮削生成nfo /// 视频信息 /// /// 一个表示异步操作的任务 - public static void GenerateVideoNfoFile(DouyinVideo video, string tvShowTitle = "") + public static void GenerateVideoNfoFile(bool closeNfo,DouyinVideo video, string tvShowTitle = "") { + if (closeNfo) return; + try { if (video.OnlyImgOrOnlyMp3) return;//图片,音频不刮削