关注列表 保存路径,同步关注列表的时候直接把保存路径设置好了=博主名字(这样可以避免你没设置路径,但是博主又改名字,导致同一个博主的视频,后面视频分散在多个文件夹),已经设置过路径的不会变

This commit is contained in:
jianzhichu
2026-02-01 21:58:11 +08:00
parent 77f227a6c5
commit 46bec7a0d4
11 changed files with 83 additions and 15 deletions
+30
View File
@@ -157,7 +157,37 @@ namespace dy.net.service
}
///// <summary>
///// 获取已经下载过视频的作者的保存路径
///// </summary>
///// <param name="uperId"></param>
///// <returns></returns>
//public async Task<string> GetDouyinUpSavePath(string uperId)
//{
// return await sqlSugarClient.Queryable<DouyinVideoUp>().Where(x => x.UperId == uperId).Select(x => x.SavePath).FirstAsync();
//}
///// <summary>
///// 保存下载过视频的作者的保存路径
///// </summary>
///// <param name="uperId"></param>
///// <param name="SavePath"></param>
///// <returns></returns>
//public async Task<bool> SaveDouyinUpSavePath(string uperId, string SavePath)
//{
// var upSavePath = await GetDouyinUpSavePath(uperId);
// if (string.IsNullOrWhiteSpace(upSavePath))
// {
// await sqlSugarClient.Insertable(new DouyinVideoUp
// {
// Id = IdGener.GetLong().ToString(),
// SavePath = SavePath,
// UperId = uperId
// }).ExecuteCommandAsync();
// }
// return true;
//}
#region
+1
View File
@@ -130,6 +130,7 @@ namespace dy.net.service
if (followdOpendCount > 20 && dto.FullSync)
{
//throw new Exception("抱歉,为了减少被风控的可能,关注列表最多同时开启20个全量同步");
Serilog.Log.Debug("为了减少被风控的可能,尽量不要同时开启这么多,虽然没限制!!!");
}
var followed = await _followRepository.GetByIdAsync(dto.Id);
+6
View File
@@ -85,6 +85,12 @@ namespace dy.net.service
updatedCount = await _dyCollectVideoRepository.UpdateRangeAsync(existingVideos);
}
//foreach (var item in videos.Where(x=>x.ViedoType==VideoTypeEnum.dy_collects||x.ViedoType == VideoTypeEnum.dy_favorite).GroupBy(x => x.AuthorId))
//{
//}
}, ex =>
{
Serilog.Log.Error(ex, "批量插入/更新抖音视频失败,AwemeIds{AwemeIds}", string.Join(",", allAwemeIds));