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,5 @@
|
|||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using API.Entities;
|
||||
|
|
@ -10,6 +11,7 @@ public interface IMangaFileRepository
|
|||
{
|
||||
void Update(MangaFile file);
|
||||
Task<IList<MangaFile>> GetAllWithMissingExtension();
|
||||
Task<MangaFile> GetByKoreaderHash(string hash);
|
||||
}
|
||||
|
||||
public class MangaFileRepository : IMangaFileRepository
|
||||
|
|
@ -32,4 +34,10 @@ public class MangaFileRepository : IMangaFileRepository
|
|||
.Where(f => string.IsNullOrEmpty(f.Extension))
|
||||
.ToListAsync();
|
||||
}
|
||||
|
||||
public Task<MangaFile> GetByKoreaderHash(string hash)
|
||||
{
|
||||
return _context.MangaFile
|
||||
.FirstOrDefaultAsync(f => f.KoreaderHash == hash.ToUpper());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue