v0.7.8 - New Filtering System (#2260)

Co-authored-by: JeanPaulDOT <jp.houssier@gmail.com>
Co-authored-by: Francois Wilhelmy <ice_mouton@hotmail.com>
Co-authored-by: Gazy Mahomar <gmahomarf@gmail.com>
Co-authored-by: Stijn <stijn.biemans@gmail.com>
Co-authored-by: 無情天 <kofzhanganguo@126.com>
Co-authored-by: Havokdan <havokdan@yahoo.com.br>
Co-authored-by: Andre <andruecha32@gmail.com>
Co-authored-by: Mateusz <mateuszvx8.96@gmail.com>
Co-authored-by: Antonio Sanchez Castellón <angelfx19@gmail.com>
Co-authored-by: Duarte Silva <smallflake@protonmail.com>
Co-authored-by: LeeWan1210 <dldhks456@live.com>
Co-authored-by: aleixcox <18121624@qq.com>
Co-authored-by: Tomas Battistini <tomas.battistini@gmail.com>
Co-authored-by: mareczek82 <marek.posiadala@gmail.com>
Co-authored-by: Hans Kalisvaart <hans.kalisvaart@gmail.com>
Co-authored-by: majora2007 <kavitareader@gmail.com>
Co-authored-by: afermar <adrian.fm@protonmail.com>
Co-authored-by: oxygen44k <iiccpp@outlook.com>
Co-authored-by: Weblate (bot) <hosted@weblate.org>
Co-authored-by: Hadrien b <hadrien.1997@gmail.com>
Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>
Co-authored-by: Andre Smith <Hobogrammer@users.noreply.github.com>
Co-authored-by: Safu Wan <safu@yahoo.com>
Co-authored-by: sibeck <sibeck.clown@gmail.com>
Co-authored-by: Florestano Pepe <florestano.pepe@gmail.com>
Co-authored-by: 书签 <shuqian.emu@gmail.com>
Co-authored-by: Stéphane Dupont <aleistor@gmail.com>
Co-authored-by: gallegonovato <fran-carro@hotmail.es>
Co-authored-by: AlienHack <the4got10@windowslive.com>
Co-authored-by: 周書丞 <tmrsm_chan@hotmail.com>
Co-authored-by: Andre Smith <andrepsmithjr@gmail.com>
Co-authored-by: xe1st <dnzkckali@gmail.com>
Co-authored-by: Jiří Heger <jiri.heger@gmail.com>
Co-authored-by: DR <weblate-kavita.snowflake668@slmail.me>
Co-authored-by: Mathieu Ares <matguitarist@gmail.com>
Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
Co-authored-by: Gazy Mahomar <gmahomarf@users.noreply.github.com>
Co-authored-by: Elias Jakob <elias.jakob100@gmail.com>
Co-authored-by: Christian Zanon <chri8431@libero.it>
Co-authored-by: Eryk Michalak <gnu.ewm@protonmail.com>
Co-authored-by: Hoshino0881118 <hoshino0881118@gmail.com>
This commit is contained in:
Joe Milazzo 2023-09-03 12:31:50 -07:00 committed by GitHub
parent bdaadbecfc
commit 979508047c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
221 changed files with 23403 additions and 6863 deletions

View file

@ -10,7 +10,7 @@ public interface IReadingItemService
{
ComicInfo? GetComicInfo(string filePath);
int GetNumberOfPages(string filePath, MangaFormat format);
string GetCoverImage(string filePath, string fileName, MangaFormat format, EncodeFormat encodeFormat);
string GetCoverImage(string filePath, string fileName, MangaFormat format, EncodeFormat encodeFormat, CoverImageSize size = CoverImageSize.Default);
void Extract(string fileFilePath, string targetDirectory, MangaFormat format, int imageCount = 1);
ParserInfo? ParseFile(string path, string rootPath, LibraryType type);
}
@ -162,7 +162,7 @@ public class ReadingItemService : IReadingItemService
}
}
public string GetCoverImage(string filePath, string fileName, MangaFormat format, EncodeFormat encodeFormat)
public string GetCoverImage(string filePath, string fileName, MangaFormat format, EncodeFormat encodeFormat, CoverImageSize size = CoverImageSize.Default)
{
if (string.IsNullOrEmpty(filePath) || string.IsNullOrEmpty(fileName))
{
@ -172,10 +172,10 @@ public class ReadingItemService : IReadingItemService
return format switch
{
MangaFormat.Epub => _bookService.GetCoverImage(filePath, fileName, _directoryService.CoverImageDirectory, encodeFormat),
MangaFormat.Archive => _archiveService.GetCoverImage(filePath, fileName, _directoryService.CoverImageDirectory, encodeFormat),
MangaFormat.Image => _imageService.GetCoverImage(filePath, fileName, _directoryService.CoverImageDirectory, encodeFormat),
MangaFormat.Pdf => _bookService.GetCoverImage(filePath, fileName, _directoryService.CoverImageDirectory, encodeFormat),
MangaFormat.Epub => _bookService.GetCoverImage(filePath, fileName, _directoryService.CoverImageDirectory, encodeFormat, size),
MangaFormat.Archive => _archiveService.GetCoverImage(filePath, fileName, _directoryService.CoverImageDirectory, encodeFormat, size),
MangaFormat.Image => _imageService.GetCoverImage(filePath, fileName, _directoryService.CoverImageDirectory, encodeFormat, size),
MangaFormat.Pdf => _bookService.GetCoverImage(filePath, fileName, _directoryService.CoverImageDirectory, encodeFormat, size),
_ => string.Empty
};
}