Release Shakeout (#1266)
* Fixed an issue with fit to screen where spread images would fail to generate a paging area long enough. * Fixed pagination placement on original scaling * Fixed an issue with webtoon reader not reporting scroll events due to a fix from manga reader. * Fixing select on black book-reader theme * Fixing canvas split centering * Fixed a bug with white mode in book reader not rendering correctly. When bookmarking new pages after previously have viewing bookmarks for a series, ensure we clear out the temp cache else your new files wont be visible till next day. * Use grid on related tab * Clear bookmarks was not hooked up. Bulk add to collection didn't have label hidden * Fixed bug where filter might stay open between pages * Fixed typo on relationship for Adaptation * Contains was missing from series relation modal * Tweaked some methods and wording on reading list page * Cleaned up the phrasing when we abort a scan. * Fixed issue where typeahead wasn't reopening and it wasn't filtering selected options * Fixed some typeahead bugs and decreased interval for docker health check * Cleaned up and fixed some logic with receiving cover image update events Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>
This commit is contained in:
parent
49d8a7c6ca
commit
a062341564
26 changed files with 90 additions and 144 deletions
|
|
@ -1,25 +0,0 @@
|
|||
**/.dockerignore
|
||||
**/.env
|
||||
**/.git
|
||||
**/.gitignore
|
||||
**/.project
|
||||
**/.settings
|
||||
**/.toolstarget
|
||||
**/.vs
|
||||
**/.vscode
|
||||
**/.idea
|
||||
**/*.*proj.user
|
||||
**/*.dbmdl
|
||||
**/*.jfm
|
||||
**/azds.yaml
|
||||
**/bin
|
||||
**/charts
|
||||
**/docker-compose*
|
||||
**/Dockerfile*
|
||||
**/node_modules
|
||||
**/npm-debug.log
|
||||
**/obj
|
||||
**/secrets.dev.yaml
|
||||
**/values.dev.yaml
|
||||
LICENSE
|
||||
README.md
|
||||
|
|
@ -150,8 +150,7 @@ namespace API.Controllers
|
|||
{
|
||||
var user = await _unitOfWork.UserRepository.GetUserByUsernameAsync(User.GetUsername());
|
||||
var totalPages = await _cacheService.CacheBookmarkForSeries(user.Id, seriesId);
|
||||
// TODO: Change Includes to None from LinkedSeries branch
|
||||
var series = await _unitOfWork.SeriesRepository.GetSeriesByIdAsync(seriesId);
|
||||
var series = await _unitOfWork.SeriesRepository.GetSeriesByIdAsync(seriesId, SeriesIncludes.None);
|
||||
|
||||
return Ok(new BookmarkInfoDto()
|
||||
{
|
||||
|
|
@ -172,11 +171,6 @@ namespace API.Controllers
|
|||
|
||||
if (!await _unitOfWork.CommitAsync()) return BadRequest("There was an issue saving progress");
|
||||
|
||||
// var series = new List<SeriesDto>()
|
||||
// {await _unitOfWork.SeriesRepository.GetSeriesDtoByIdAsync(markReadDto.SeriesId, user.Id)};
|
||||
// await _unitOfWork.SeriesRepository.AddSeriesModifiers(user.Id, series);
|
||||
// await _eventHub.SendMessageAsync(MessageFactory.UserProgressUpdate,
|
||||
// MessageFactory.UserProgressUpdateEvent(user.Id, user.UserName, markReadDto.SeriesId, series[0], series[0].Pages));
|
||||
return Ok();
|
||||
}
|
||||
|
||||
|
|
@ -194,16 +188,6 @@ namespace API.Controllers
|
|||
|
||||
if (!await _unitOfWork.CommitAsync()) return BadRequest("There was an issue saving progress");
|
||||
|
||||
// Should I do this for every chapter? Maybe in a background task?
|
||||
// foreach (var chapterId in await
|
||||
// _unitOfWork.SeriesRepository.GetChapterIdsForSeriesAsync(new List<int>() {markReadDto.SeriesId}))
|
||||
// {
|
||||
// await _eventHub.SendMessageAsync(MessageFactory.UserProgressUpdate,
|
||||
// MessageFactory.UserProgressUpdateEvent(user.Id, user.UserName, chapterId, MessageFactoryEntityTypes.Chapter, 0));
|
||||
// }
|
||||
//
|
||||
// await _eventHub.SendMessageAsync(MessageFactory.UserProgressUpdate,
|
||||
// MessageFactory.UserProgressUpdateEvent(user.Id, user.UserName, markReadDto.SeriesId, MessageFactoryEntityTypes.Series, 0));
|
||||
return Ok();
|
||||
}
|
||||
|
||||
|
|
@ -580,6 +564,7 @@ namespace API.Controllers
|
|||
|
||||
if (await _bookmarkService.BookmarkPage(user, bookmarkDto, path))
|
||||
{
|
||||
BackgroundJob.Enqueue(() => _cacheService.CleanupBookmarkCache(bookmarkDto.SeriesId));
|
||||
return Ok();
|
||||
}
|
||||
|
||||
|
|
@ -599,6 +584,7 @@ namespace API.Controllers
|
|||
|
||||
if (await _bookmarkService.RemoveBookmarkPage(user, bookmarkDto))
|
||||
{
|
||||
BackgroundJob.Enqueue(() => _cacheService.CleanupBookmarkCache(bookmarkDto.SeriesId));
|
||||
return Ok();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -102,6 +102,8 @@ namespace API.Controllers
|
|||
|
||||
if (_unitOfWork.HasChanges())
|
||||
{
|
||||
await _eventHub.SendMessageAsync(MessageFactory.CoverUpdate,
|
||||
MessageFactory.CoverUpdateEvent(series.Id, MessageFactoryEntityTypes.Series), false);
|
||||
await _unitOfWork.CommitAsync();
|
||||
return Ok();
|
||||
}
|
||||
|
|
@ -245,6 +247,10 @@ namespace API.Controllers
|
|||
if (_unitOfWork.HasChanges())
|
||||
{
|
||||
await _unitOfWork.CommitAsync();
|
||||
await _eventHub.SendMessageAsync(MessageFactory.CoverUpdate,
|
||||
MessageFactory.CoverUpdateEvent(chapter.VolumeId, MessageFactoryEntityTypes.Volume), false);
|
||||
await _eventHub.SendMessageAsync(MessageFactory.CoverUpdate,
|
||||
MessageFactory.CoverUpdateEvent(chapter.Id, MessageFactoryEntityTypes.Chapter), false);
|
||||
return Ok();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,40 +0,0 @@
|
|||
#This Dockerfile pulls the latest git commit and builds Kavita from source
|
||||
FROM mcr.microsoft.com/dotnet/sdk:6.0-focal AS builder
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ARG TARGETPLATFORM
|
||||
|
||||
#Installs nodejs and npm
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash - \
|
||||
&& apt-get install -y nodejs \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#Builds app based on platform
|
||||
COPY build_target.sh /build_target.sh
|
||||
RUN /build_target.sh
|
||||
|
||||
#Production image
|
||||
FROM ubuntu:focal
|
||||
|
||||
#Move the output files to where they need to be
|
||||
COPY --from=builder /Projects/Kavita/_output/build/Kavita /kavita
|
||||
|
||||
#Installs program dependencies
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y libicu-dev libssl1.1 pwgen \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#Creates the manga storage directory
|
||||
RUN mkdir /manga /kavita/data
|
||||
|
||||
RUN cp /kavita/appsettings.Development.json /kavita/appsettings.json \
|
||||
&& sed -i 's/Data source=kavita.db/Data source=data\/kavita.db/g' /kavita/appsettings.json
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
|
||||
EXPOSE 5000
|
||||
|
||||
WORKDIR /kavita
|
||||
|
||||
ENTRYPOINT ["/bin/bash"]
|
||||
CMD ["/entrypoint.sh"]
|
||||
|
|
@ -32,6 +32,7 @@ namespace API.Services
|
|||
string GetCachedEpubFile(int chapterId, Chapter chapter);
|
||||
public void ExtractChapterFiles(string extractPath, IReadOnlyList<MangaFile> files);
|
||||
Task<int> CacheBookmarkForSeries(int userId, int seriesId);
|
||||
void CleanupBookmarkCache(int bookmarkDtoSeriesId);
|
||||
}
|
||||
public class CacheService : ICacheService
|
||||
{
|
||||
|
|
@ -240,5 +241,17 @@ namespace API.Services
|
|||
_directoryService.Flatten(destDirectory);
|
||||
return files.Count;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clears a cached bookmarks for a series id folder
|
||||
/// </summary>
|
||||
/// <param name="seriesId"></param>
|
||||
public void CleanupBookmarkCache(int seriesId)
|
||||
{
|
||||
var destDirectory = _directoryService.FileSystem.Path.Join(_directoryService.CacheDirectory, seriesId + "_bookmarks");
|
||||
if (!_directoryService.Exists(destDirectory)) return;
|
||||
|
||||
_directoryService.ClearAndDeleteDirectory(destDirectory);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ namespace API.Services.Tasks
|
|||
/// </summary>
|
||||
public Task CleanupBookmarks()
|
||||
{
|
||||
// This is disabled for now while we test and validate a new method of deleting bookmarks
|
||||
// TODO: This is disabled for now while we test and validate a new method of deleting bookmarks
|
||||
return Task.CompletedTask;
|
||||
// Search all files in bookmarks/ except bookmark files and delete those
|
||||
// var bookmarkDirectory =
|
||||
|
|
|
|||
|
|
@ -215,12 +215,12 @@ public class ScannerService : IScannerService
|
|||
// That way logging and UI informing is all in one place with full context
|
||||
_logger.LogError("Some of the root folders for the library are empty. " +
|
||||
"Either your mount has been disconnected or you are trying to delete all series in the library. " +
|
||||
"Scan will be aborted. " +
|
||||
"Scan has be aborted. " +
|
||||
"Check that your mount is connected or change the library's root folder and rescan");
|
||||
|
||||
await _eventHub.SendMessageAsync(MessageFactory.Error, MessageFactory.ErrorEvent( $"Some of the root folders for the library, {libraryName}, are empty.",
|
||||
"Either your mount has been disconnected or you are trying to delete all series in the library. " +
|
||||
"Scan will be aborted. " +
|
||||
"Scan has be aborted. " +
|
||||
"Check that your mount is connected or change the library's root folder and rescan"));
|
||||
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue