完成合集、短剧
This commit is contained in:
+20
-4
@@ -13,19 +13,35 @@ namespace dy.net.job
|
||||
}
|
||||
|
||||
|
||||
protected override VideoTypeEnum VideoType => VideoTypeEnum.dy_favorite;
|
||||
protected override VideoTypeEnum VideoType => VideoTypeEnum.dy_mix;
|
||||
|
||||
|
||||
protected override async Task<DouyinVideoInfoResponse> FetchVideoData(DouyinCookie cookie, string cursor,DouyinFollowed followed,DouyinCollectCate cate)
|
||||
{
|
||||
return await douyinHttpClientService.SyncFavoriteVideos(count, cursor, cookie.SecUserId, cookie.Cookies);
|
||||
return await douyinHttpClientService.SyncMixViedosByMixId(cursor,count,cookie.Cookies,cate.XId);
|
||||
}
|
||||
|
||||
protected override bool ShouldContinueSync(DouyinCookie cookie, DouyinVideoInfoResponse data, DouyinFollowed followed=null)
|
||||
{
|
||||
return data != null && data.HasMore == 1 && cookie.FavHasSyncd == 0;
|
||||
return data != null && data.HasMore == 1;
|
||||
}
|
||||
protected override string CreateSaveFolder(DouyinCookie cookie, Aweme item, AppConfig config, DouyinFollowed followed, DouyinCollectCate cate)
|
||||
{
|
||||
if (cate != null)
|
||||
{
|
||||
var folder = Path.Combine(cookie.SavePath,VideoType.GetDesc(), DouyinFileNameHelper.SanitizeLinuxFileName(cate.SaveFolder, cate.Name, true));
|
||||
if (!Directory.Exists(folder)) Directory.CreateDirectory(folder);
|
||||
return folder;
|
||||
}
|
||||
else
|
||||
{
|
||||
return base.CreateSaveFolder(cookie, item, config, followed, cate);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected override string GetAuthorAvatarBasePath(DouyinCookie cookie)
|
||||
{
|
||||
return Path.Combine(cookie.SavePath, "author");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user