Preparation for Release (#2135)

* Don't allow Comic libraries to do any scrobbling as there aren't any Comic scrobbling providers yet.

* Fixed a bug where if you have multiple libraries pointing the same folder (for whatever reason), the Scan Folder api could be rejected.

* Handle if publication from an epub is empty to avoid a bad parse error

* Cleaned up some hardcoded default strings.

* Fixed up some defaulting code for the cache size.

* Changed how moving something back to on deck works after it's been removed. Now any progress will trigger it, as epubs don't have chapters.

* Ignore .caltrash, which is a Calibre managed folder, when scanning.

* Added the ability to see Volume Last Read Date (or individual chapter) in details drawer. Hover over the clock for the full timestamp.
This commit is contained in:
Joe Milazzo 2023-07-17 08:48:15 -05:00 committed by GitHub
parent 8a6b58d1f8
commit ed4f9e0144
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 66 additions and 40 deletions

View file

@ -188,6 +188,7 @@ public class ScrobblingService : IScrobblingService
if (series == null) throw new KavitaException("Series not found");
var library = await _unitOfWork.LibraryRepository.GetLibraryForIdAsync(series.LibraryId);
if (library is not {AllowScrobbling: true}) return;
if (library.Type == LibraryType.Comic) return;
var existingEvt = await _unitOfWork.ScrobbleRepository.GetEvent(userId, series.Id,
ScrobbleEventType.Review);
@ -232,6 +233,7 @@ public class ScrobblingService : IScrobblingService
if (series == null) throw new KavitaException("Series not found");
var library = await _unitOfWork.LibraryRepository.GetLibraryForIdAsync(series.LibraryId);
if (library is not {AllowScrobbling: true}) return;
if (library.Type == LibraryType.Comic) return;
var existingEvt = await _unitOfWork.ScrobbleRepository.GetEvent(userId, series.Id,
ScrobbleEventType.ScoreUpdated);
@ -280,6 +282,7 @@ public class ScrobblingService : IScrobblingService
}
var library = await _unitOfWork.LibraryRepository.GetLibraryForIdAsync(series.LibraryId);
if (library is not {AllowScrobbling: true}) return;
if (library.Type == LibraryType.Comic) return;
var existingEvt = await _unitOfWork.ScrobbleRepository.GetEvent(userId, series.Id,
ScrobbleEventType.ChapterRead);
@ -339,6 +342,7 @@ public class ScrobblingService : IScrobblingService
if (series == null) throw new KavitaException("Series not found");
var library = await _unitOfWork.LibraryRepository.GetLibraryForIdAsync(series.LibraryId);
if (library is not {AllowScrobbling: true}) return;
if (library.Type == LibraryType.Comic) return;
var existing = await _unitOfWork.ScrobbleRepository.Exists(userId, series.Id,
onWantToRead ? ScrobbleEventType.AddWantToRead : ScrobbleEventType.RemoveWantToRead);