Misc Bugfixes (#1582)

* Fixed a bug with RBS on non-admin accounts

* Fixed a bug where get next/prev chapter wouldn't respect floating point volume numbers

* Fixed a bad migration version check

* When building kavita ignore exclusions, ignore blank lines.

* Hooked up the GetFullSeriesByAnyName to check against OriginalName exactly

* Refactored some code for building ignore from library root, to keep the code cleaner

* Tweaked some messaging

* Fixed a bad directory join when a change event occurs in a nested series folder.

* Fixed a bug where cover generation would prioritize a special if there were only chapters in the series.

* Fixed a bug where you couldn't update a series modal if there wasn't a release year present

* Fixed an issue where renaming the Series in Kavita wouldn't allow ScanSeries to see the files, and thus would delete the Series.

* Added an additional check with Hangfire to make sure ScanFolder doesn't kick off a change when a bunch of changes come through for the same directory, but a job is already running.

* Added more documentation

* Migrated more response caching to profiles and merged 2 apis into one, since they do the same thing.

* Fixed a bug where NotApplicable age ratings were breaking Recently Updated Series

* Cleaned up some cache profiles

* More caching

* Provide response caching on Get Next/Prev Chapter

* Code smells
This commit is contained in:
Joe Milazzo 2022-10-10 19:23:37 -05:00 committed by GitHub
parent b6f6b0ed99
commit c652c36081
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 227 additions and 82 deletions

View file

@ -16,13 +16,14 @@ public static class MigrateReadingListAgeRating
/// <summary>
/// Will not run if any above v0.5.6.24 or v0.6.0
/// </summary>
/// <param name="unitOfWork"></param>
/// <param name="context"></param>
/// <param name="readingListService"></param>
/// <param name="logger"></param>
public static async Task Migrate(IUnitOfWork unitOfWork, DataContext context, IReadingListService readingListService, ILogger<Program> logger)
{
var settings = await unitOfWork.SettingsRepository.GetSettingsDtoAsync();
if (Version.Parse(settings.InstallVersion) > new Version(0, 5, 6, 24))
if (Version.Parse(settings.InstallVersion) > new Version(0, 5, 6, 26))
{
return;
}

View file

@ -188,6 +188,10 @@ public class LibraryRepository : ILibraryRepository
});
}
/// <summary>
/// Returns all Libraries with their Folders
/// </summary>
/// <returns></returns>
public async Task<IEnumerable<LibraryDto>> GetLibraryDtosAsync()
{
return await _context.Library

View file

@ -1048,7 +1048,11 @@ public class SeriesRepository : ISeriesRepository
var userRating = await GetUserAgeRestriction(userId);
var items = (await GetRecentlyAddedChaptersQuery(userId));
foreach (var item in items.Where(c => c.AgeRating <= userRating))
if (userRating != AgeRating.NotApplicable)
{
items = items.Where(c => c.AgeRating <= userRating);
}
foreach (var item in items)
{
if (seriesMap.Keys.Count == pageSize) break;
@ -1215,7 +1219,8 @@ public class SeriesRepository : ISeriesRepository
.Where(s => s.LibraryId == libraryId)
.Where(s => s.Format == format && format != MangaFormat.Unknown)
.Where(s => s.NormalizedName.Equals(normalizedSeries)
|| (s.NormalizedLocalizedName.Equals(normalizedSeries) && s.NormalizedLocalizedName != string.Empty));
|| (s.NormalizedLocalizedName.Equals(normalizedSeries) && s.NormalizedLocalizedName != string.Empty)
|| s.OriginalName.Equals(seriesName));
if (!string.IsNullOrEmpty(normalizedLocalized))
{