Skip to content

Commit

Permalink
优化模板发布日期解析
Browse files Browse the repository at this point in the history
  • Loading branch information
nilaoda committed Jul 14, 2023
1 parent 7f34504 commit 9eeabad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion BBDown/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,7 @@ private static string FormatSavePath(string savePathFormat, string title, Video?
"videoBandwidth" => videoTrack == null ? "" : videoTrack.bandwith.ToString(),
"audioCodecs" => audioTrack == null ? "" : audioTrack.codecs,
"audioBandwidth" => audioTrack == null ? "" : audioTrack.bandwith.ToString(),
"publishDate" => string.IsNullOrEmpty(pubTime) ? "" : DateTime.Parse(pubTime).ToString("yyyy-MM-dd_HH-mm-ss"),
"publishDate" => (string.IsNullOrEmpty(pubTime) || !DateTime.TryParse(pubTime, out var dt)) ? "" : dt.ToString("yyyy-MM-dd_HH-mm-ss"),
"apiType" => tvApi ? "TV" : (appApi ? "APP" : (intlApi ? "INTL" : "WEB")),
_ => $"<{key}>"
};
Expand Down

0 comments on commit 9eeabad

Please sign in to comment.