Tachiyomi + Fixes (#1481)

* Fixed a bootstrap bug

* Fixed repeating images on collection detail

* Fixed up some logic in library watcher which wasn't processing all of the queue.

* When parsing non-epubs in Book library, use Manga parsing for Volume support to better support Light Novels

* Fixed some bugs with the tachiyomi plugin api's for progress tracking
This commit is contained in:
Joseph Milazzo 2022-08-25 18:38:36 -05:00 committed by GitHub
parent 36300c538c
commit 0cd14b3efc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 27 additions and 24 deletions

View file

@ -49,9 +49,8 @@ public class TachiyomiController : BaseApiController
// If prevChapterId is -1, this means either nothing is read or everything is read.
if (prevChapterId == -1)
{
var userWithProgress = await _unitOfWork.UserRepository.GetUserByIdAsync(userId, AppUserIncludes.Progress);
var userHasProgress =
userWithProgress.Progresses.Any(x => x.SeriesId == seriesId);
var series = await _unitOfWork.SeriesRepository.GetSeriesDtoByIdAsync(seriesId, userId);
var userHasProgress = series.PagesRead == 0 || series.PagesRead < series.Pages;
// If the user doesn't have progress, then return null, which the extension will catch as 204 (no content) and report nothing as read
if (!userHasProgress) return null;
@ -75,7 +74,8 @@ public class TachiyomiController : BaseApiController
// There is progress, we now need to figure out the highest volume or chapter and return that.
var prevChapter = await _unitOfWork.ChapterRepository.GetChapterDtoAsync(prevChapterId);
var volumeWithProgress = await _unitOfWork.VolumeRepository.GetVolumeDtoAsync(prevChapter.VolumeId, userId);
if (volumeWithProgress.Number != 0)
// We only encode for single-file volumes
if (volumeWithProgress.Number != 0 && volumeWithProgress.Chapters.Count == 1)
{
// The progress is on a volume, encode it as a fake chapterDTO
return Ok(new ChapterDto()