1、完成图片视频
2、优化定时任务,抽出基类服务 3、todo:日志保存时间设置,默认10天 4、todo:同一个视频-只下载一次。就是对于收藏了,又喜欢了,或者又刚好是关注的up主,看哪个定时任务先同步到,后面就不在重复下载了
This commit is contained in:
@@ -46,7 +46,7 @@ namespace dy.net.job
|
||||
return data?.MaxCursor ?? "0";
|
||||
}
|
||||
|
||||
protected override string CreateSaveFolder(DouyinUserCookie cookie, Aweme item, string tag1, string tag2)
|
||||
protected override string CreateSaveFolder(DouyinUserCookie cookie, Aweme item, string tag1, string tag2, AppConfig config)
|
||||
{
|
||||
var safeTag1 = string.IsNullOrWhiteSpace(tag1) ? "other" : TikTokFileNameHelper.SanitizePath(tag1);
|
||||
var folder = Path.Combine(cookie.FavSavePath, safeTag1, $"{TikTokFileNameHelper.SanitizePath(item.Desc)}@{item.AwemeId}");
|
||||
@@ -54,8 +54,9 @@ namespace dy.net.job
|
||||
return folder;
|
||||
}
|
||||
|
||||
protected override string GetVideoFileName(DouyinUserCookie cookie, Aweme item, VideoBitRate bitRate)
|
||||
protected override string GetVideoFileName(DouyinUserCookie cookie, Aweme item)
|
||||
{
|
||||
var bitRate = item.Video.BitRate.FirstOrDefault();
|
||||
return $"{item.AwemeId}.{bitRate.Format}";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user