mirror of
https://github.com/Rast1234/VOffline.git
synced 2026-07-09 17:19:06 +00:00
fix missing cache file; add video urls #3
This commit is contained in:
parent
59441cd0d0
commit
3df69fc5e6
3 changed files with 11 additions and 2 deletions
|
|
@ -27,6 +27,11 @@ namespace VOffline.Services.Storage
|
|||
RootDir = MkDir(settings.Value.OutputPath);
|
||||
cacheFile = new FileInfo(CombineCutPath(RootDir, CacheFilename));
|
||||
cache = new ConcurrentDictionary<string, DateTime>();
|
||||
|
||||
if (!cacheFile.Exists)
|
||||
{
|
||||
cacheFile.Create()?.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
public void LoadCache(ILog log)
|
||||
|
|
|
|||
|
|
@ -94,7 +94,9 @@ namespace VOffline.Services.Vk
|
|||
}
|
||||
else
|
||||
{
|
||||
log.Warn($"Video {video.Id} [{video.Title}] has no links");
|
||||
log.Warn($"Video {video.Id} [{video.Title}] has no links. Trying to compose vk url");
|
||||
var file = filesystemTools.CreateFile(dir, $"{i} {video.Id}.txt", CreateMode.OverwriteExisting);
|
||||
File.WriteAllText(file.FullName, $"https://vk.com/video{video.OwnerId}_{video.Id}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -201,6 +203,7 @@ namespace VOffline.Services.Vk
|
|||
{
|
||||
sb.Append($", reply to user {comment.ReplyToUserId} comment {comment.ReplyToCommentId}");
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,9 @@
|
|||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<UsersecretsId>26938AF3-7336-429C-A3AF-2D3048ACB226</UsersecretsId>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<RootNamespace>VOffline</RootNamespace>
|
||||
<UserSecretsId>93680df2-87fc-4326-b623-001d5725f6ae</UserSecretsId>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue