Koreader progress sync interface (#3025)
Co-authored-by: Joe Milazzo <josephmajora@gmail.com>
This commit is contained in:
parent
1a88dd4fc0
commit
180b49b8ea
45 changed files with 5848 additions and 8312 deletions
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.IO;
|
||||
using API.Entities;
|
||||
using API.Entities.Enums;
|
||||
|
|
@ -20,7 +20,7 @@ public class MangaFileBuilder : IEntityBuilder<MangaFile>
|
|||
Pages = pages,
|
||||
LastModified = File.GetLastWriteTime(filePath),
|
||||
LastModifiedUtc = File.GetLastWriteTimeUtc(filePath),
|
||||
FileName = Parser.RemoveExtensionIfSupported(filePath)
|
||||
FileName = Parser.RemoveExtensionIfSupported(filePath),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -60,4 +60,14 @@ public class MangaFileBuilder : IEntityBuilder<MangaFile>
|
|||
_mangaFile.Id = Math.Max(id, 0);
|
||||
return this;
|
||||
}
|
||||
|
||||
public MangaFileBuilder WithHash()
|
||||
{
|
||||
if (_mangaFile.Format == MangaFormat.Epub)
|
||||
{
|
||||
_mangaFile.KoreaderHash = KoreaderHelper.HashContents(_mangaFile.FilePath);
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue