From e50159fdb6c31d5eb9cd32982510cedbe7146810 Mon Sep 17 00:00:00 2001
From: croire <1432593898@qq.com>
Date: Sun, 13 Mar 2022 11:43:24 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=96=87=E4=BB=B6=E5=91=BD?=
=?UTF-8?q?=E5=90=8D=E4=B8=AD=E7=9A=84=E6=97=B6=E9=97=B4=E6=A0=BC=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
DownKyi/Languages/Default.xaml | 1 +
DownKyi/Services/BangumiInfoService.cs | 4 +++-
DownKyi/Services/VideoInfoService.cs | 4 +++-
DownKyi/Views/Settings/ViewVideo.xaml | 2 +-
4 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/DownKyi/Languages/Default.xaml b/DownKyi/Languages/Default.xaml
index a590212..c8425a5 100644
--- a/DownKyi/Languages/Default.xaml
+++ b/DownKyi/Languages/Default.xaml
@@ -219,6 +219,7 @@
UP主ID
UP主昵称
恢复默认
+ 时间格式:
弹幕
按类型屏蔽
diff --git a/DownKyi/Services/BangumiInfoService.cs b/DownKyi/Services/BangumiInfoService.cs
index 6c1b8dd..cc1a5ff 100644
--- a/DownKyi/Services/BangumiInfoService.cs
+++ b/DownKyi/Services/BangumiInfoService.cs
@@ -197,10 +197,12 @@ namespace DownKyi.Services
};
}
+ // 文件命名中的时间格式
+ string timeFormat = SettingsManager.GetInstance().GetFileNamePartTimeFormat();
// 视频发布时间
DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1)); // 当地时区
DateTime dateTime = startTime.AddSeconds(episode.PubTime);
- page.PublishTime = dateTime.ToString("yyyy-MM-dd");
+ page.PublishTime = dateTime.ToString(timeFormat);
pages.Add(page);
}
diff --git a/DownKyi/Services/VideoInfoService.cs b/DownKyi/Services/VideoInfoService.cs
index e661601..9c34ca4 100644
--- a/DownKyi/Services/VideoInfoService.cs
+++ b/DownKyi/Services/VideoInfoService.cs
@@ -154,10 +154,12 @@ namespace DownKyi.Services
};
}
+ // 文件命名中的时间格式
+ string timeFormat = SettingsManager.GetInstance().GetFileNamePartTimeFormat();
// 视频发布时间
DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1)); // 当地时区
DateTime dateTime = startTime.AddSeconds(videoView.Pubdate);
- page.PublishTime = dateTime.ToString("yyyy-MM-dd");
+ page.PublishTime = dateTime.ToString(timeFormat);
// 这里的发布时间有问题,
// 如果是合集,也会执行这里,
// 但是发布时间是入口视频的,不是所有视频的
diff --git a/DownKyi/Views/Settings/ViewVideo.xaml b/DownKyi/Views/Settings/ViewVideo.xaml
index 3efb045..844722e 100644
--- a/DownKyi/Views/Settings/ViewVideo.xaml
+++ b/DownKyi/Views/Settings/ViewVideo.xaml
@@ -228,7 +228,7 @@
VerticalAlignment="Center"
FontSize="12"
Foreground="{DynamicResource BrushTextDark}"
- Text="时间格式:" />
+ Text="{DynamicResource FileNameTimeFormat}" />