mirror of
https://github.com/C9Glax/tranga.git
synced 2025-10-15 01:40:44 +02:00
Downloaded chapters filenames are not set in database
This commit is contained in:
@@ -22,7 +22,7 @@ public class Chapter : Identifiable, IComparable<Chapter>
|
||||
|
||||
[StringLength(256)] public string? Title { get; private set; }
|
||||
|
||||
[StringLength(256)] public string? FileName { get; private set; }
|
||||
[StringLength(256)] public string? FileName { get; internal set; }
|
||||
|
||||
public bool Downloaded { get; internal set; }
|
||||
|
||||
|
@@ -164,7 +164,8 @@ public class DownloadChapterFromMangaconnectorWorker(MangaConnectorId<Chapter> c
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
||||
File.SetUnixFileMode(saveArchiveFilePath, UserRead | UserWrite | UserExecute | GroupRead | GroupWrite | GroupExecute );
|
||||
|
||||
DbContext.Entry(chapter).Property(c => c.Downloaded).CurrentValue = true;
|
||||
chapter.Downloaded = true;
|
||||
chapter.FileName = new FileInfo(saveArchiveFilePath).Name;
|
||||
if(await DbContext.Sync(CancellationToken, GetType(), System.Reflection.MethodBase.GetCurrentMethod()?.Name) is { success: false } e)
|
||||
Log.Error($"Failed to save database changes: {e.exceptionMessage}");
|
||||
|
||||
|
Reference in New Issue
Block a user