v0.8.3.2 - A Small Hotfix (#3194)
Co-authored-by: Robbie Davis <robbie@therobbiedavis.com> Co-authored-by: Weblate (bot) <hosted@weblate.org> Co-authored-by: Havokdan <havokdan@yahoo.com.br> Co-authored-by: daydreamrabbit <devrabbit90@gmail.com> Co-authored-by: 無情天 <kofzhanganguo@126.com>
This commit is contained in:
parent
77de5ccce3
commit
894b49bb76
43 changed files with 307 additions and 241 deletions
|
@ -549,12 +549,15 @@ public class OpdsController : BaseApiController
|
|||
Id = readingListDto.Id.ToString(),
|
||||
Title = readingListDto.Title,
|
||||
Summary = readingListDto.Summary,
|
||||
Links = new List<FeedLink>()
|
||||
{
|
||||
CreateLink(FeedLinkRelation.SubSection, FeedLinkType.AtomNavigation, $"{prefix}{apiKey}/reading-list/{readingListDto.Id}"),
|
||||
CreateLink(FeedLinkRelation.Image, FeedLinkType.Image, $"{baseUrl}api/image/readinglist-cover?readingListId={readingListDto.Id}&apiKey={apiKey}"),
|
||||
CreateLink(FeedLinkRelation.Thumbnail, FeedLinkType.Image, $"{baseUrl}api/image/readinglist-cover?readingListId={readingListDto.Id}&apiKey={apiKey}")
|
||||
}
|
||||
Links =
|
||||
[
|
||||
CreateLink(FeedLinkRelation.SubSection, FeedLinkType.AtomNavigation,
|
||||
$"{prefix}{apiKey}/reading-list/{readingListDto.Id}"),
|
||||
CreateLink(FeedLinkRelation.Image, FeedLinkType.Image,
|
||||
$"{baseUrl}api/image/readinglist-cover?readingListId={readingListDto.Id}&apiKey={apiKey}"),
|
||||
CreateLink(FeedLinkRelation.Thumbnail, FeedLinkType.Image,
|
||||
$"{baseUrl}api/image/readinglist-cover?readingListId={readingListDto.Id}&apiKey={apiKey}")
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -573,7 +576,7 @@ public class OpdsController : BaseApiController
|
|||
|
||||
[HttpGet("{apiKey}/reading-list/{readingListId}")]
|
||||
[Produces("application/xml")]
|
||||
public async Task<IActionResult> GetReadingListItems(int readingListId, string apiKey)
|
||||
public async Task<IActionResult> GetReadingListItems(int readingListId, string apiKey, [FromQuery] int pageNumber = 0)
|
||||
{
|
||||
var userId = await GetUser(apiKey);
|
||||
if (!(await _unitOfWork.SettingsRepository.GetSettingsDtoAsync()).EnableOpds)
|
||||
|
@ -592,7 +595,7 @@ public class OpdsController : BaseApiController
|
|||
var feed = CreateFeed(readingList.Title + " " + await _localizationService.Translate(userId, "reading-list"), $"{apiKey}/reading-list/{readingListId}", apiKey, prefix);
|
||||
SetFeedId(feed, $"reading-list-{readingListId}");
|
||||
|
||||
var items = (await _unitOfWork.ReadingListRepository.GetReadingListItemDtosByIdAsync(readingListId, userId)).ToList();
|
||||
var items = await _unitOfWork.ReadingListRepository.GetReadingListItemDtosByIdAsync(readingListId, userId);
|
||||
foreach (var item in items)
|
||||
{
|
||||
var chapterDto = await _unitOfWork.ChapterRepository.GetChapterDtoAsync(item.ChapterId);
|
||||
|
|
|
@ -345,7 +345,7 @@ public class SettingsController : BaseApiController
|
|||
|
||||
if (updateBookmarks)
|
||||
{
|
||||
BackgroundJob.Enqueue(() => UpdateBookmarkDirectory(originalBookmarkDirectory, bookmarkDirectory));
|
||||
UpdateBookmarkDirectory(originalBookmarkDirectory, bookmarkDirectory);
|
||||
}
|
||||
|
||||
if (updateSettingsDto.EnableFolderWatching)
|
||||
|
@ -371,6 +371,7 @@ public class SettingsController : BaseApiController
|
|||
return Ok(updateSettingsDto);
|
||||
}
|
||||
|
||||
|
||||
private void UpdateBookmarkDirectory(string originalBookmarkDirectory, string bookmarkDirectory)
|
||||
{
|
||||
_directoryService.ExistOrCreate(bookmarkDirectory);
|
||||
|
|
|
@ -9,7 +9,7 @@ public class ConfirmEmailDto
|
|||
[Required]
|
||||
public string Token { get; set; } = default!;
|
||||
[Required]
|
||||
[StringLength(32, MinimumLength = 6)]
|
||||
[StringLength(256, MinimumLength = 6)]
|
||||
public string Password { get; set; } = default!;
|
||||
[Required]
|
||||
public string Username { get; set; } = default!;
|
||||
|
|
|
@ -9,6 +9,6 @@ public class ConfirmPasswordResetDto
|
|||
[Required]
|
||||
public string Token { get; set; } = default!;
|
||||
[Required]
|
||||
[StringLength(32, MinimumLength = 6)]
|
||||
[StringLength(256, MinimumLength = 6)]
|
||||
public string Password { get; set; } = default!;
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ public class ResetPasswordDto
|
|||
/// The new password
|
||||
/// </summary>
|
||||
[Required]
|
||||
[StringLength(32, MinimumLength = 6)]
|
||||
[StringLength(256, MinimumLength = 6)]
|
||||
public string Password { get; init; } = default!;
|
||||
/// <summary>
|
||||
/// The old, existing password. If an admin is performing the change, this is not required. Otherwise, it is.
|
||||
|
|
|
@ -11,6 +11,6 @@ public class RegisterDto
|
|||
/// </summary>
|
||||
public string Email { get; init; } = default!;
|
||||
[Required]
|
||||
[StringLength(32, MinimumLength = 6)]
|
||||
[StringLength(256, MinimumLength = 6)]
|
||||
public string Password { get; set; } = default!;
|
||||
}
|
||||
|
|
|
@ -119,6 +119,7 @@ public class CacheService : ICacheService
|
|||
}
|
||||
|
||||
_logger.LogDebug("File Dimensions call for {Length} images took {Time}ms", dimensions.Count, sw.ElapsedMilliseconds);
|
||||
|
||||
return dimensions;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue