Last Shakeout before Release (#2253)
* [skip ci] Weblate Changes (#2250) * [skip ci] Translated using Weblate (Korean) Currently translated at 100.0% (1486 of 1486 strings) Translation: Kavita/ui Translate-URL: https://hosted.weblate.org/projects/kavita/ui/ko/ * [skip ci] Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (1486 of 1486 strings) Translation: Kavita/ui Translate-URL: https://hosted.weblate.org/projects/kavita/ui/zh_Hans/ * Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (161 of 161 strings) Translation: Kavita/backend Translate-URL: https://hosted.weblate.org/projects/kavita/backend/zh_Hans/ * Translated using Weblate (Korean) Currently translated at 100.0% (161 of 161 strings) Translation: Kavita/backend Translate-URL: https://hosted.weblate.org/projects/kavita/backend/ko/ * Translated using Weblate (Czech) Currently translated at 100.0% (161 of 161 strings) Translation: Kavita/backend Translate-URL: https://hosted.weblate.org/projects/kavita/backend/cs/ * [skip ci] Translated using Weblate (Czech) Currently translated at 15.7% (234 of 1486 strings) Translation: Kavita/ui Translate-URL: https://hosted.weblate.org/projects/kavita/ui/cs/ * [skip ci] Translated using Weblate (Spanish) Currently translated at 88.5% (1316 of 1486 strings) Translation: Kavita/ui Translate-URL: https://hosted.weblate.org/projects/kavita/ui/es/ * Translated using Weblate (Spanish) Currently translated at 100.0% (161 of 161 strings) Translation: Kavita/backend Translate-URL: https://hosted.weblate.org/projects/kavita/backend/es/ * [skip ci] Translated using Weblate (Dutch) Currently translated at 72.2% (1073 of 1486 strings) Translation: Kavita/ui Translate-URL: https://hosted.weblate.org/projects/kavita/ui/nl/ * Translated using Weblate (Italian) Currently translated at 100.0% (161 of 161 strings) Translation: Kavita/backend Translate-URL: https://hosted.weblate.org/projects/kavita/backend/it/ * [skip ci] Translated using Weblate (Italian) Currently translated at 100.0% (1486 of 1486 strings) Translation: Kavita/ui Translate-URL: https://hosted.weblate.org/projects/kavita/ui/it/ --------- Co-authored-by: LeeWan1210 <dldhks456@live.com> Co-authored-by: aleixcox <18121624@qq.com> Co-authored-by: Jiří Heger <jiri.heger@gmail.com> Co-authored-by: gallegonovato <fran-carro@hotmail.es> Co-authored-by: Hans Kalisvaart <hans.kalisvaart@gmail.com> Co-authored-by: Florestano Pepe <florestano.pepe@gmail.com> * Fixed bookmark page not sorting and ordering correctly. --------- Co-authored-by: Weblate (bot) <hosted@weblate.org> Co-authored-by: LeeWan1210 <dldhks456@live.com> Co-authored-by: aleixcox <18121624@qq.com> Co-authored-by: Jiří Heger <jiri.heger@gmail.com> Co-authored-by: gallegonovato <fran-carro@hotmail.es> Co-authored-by: Hans Kalisvaart <hans.kalisvaart@gmail.com> Co-authored-by: Florestano Pepe <florestano.pepe@gmail.com>
This commit is contained in:
parent
5a947fa525
commit
ea4571b3d6
17 changed files with 265 additions and 236 deletions
|
@ -13,4 +13,8 @@ public class BookmarkDto
|
|||
public int SeriesId { get; set; }
|
||||
[Required]
|
||||
public int ChapterId { get; set; }
|
||||
/// <summary>
|
||||
/// This is only used when getting all bookmarks.
|
||||
/// </summary>
|
||||
public SeriesDto? Series { get; set; }
|
||||
}
|
||||
|
|
|
@ -383,13 +383,6 @@ public class UserRepository : IUserRepository
|
|||
.OrderBy(x => x.Created)
|
||||
.AsNoTracking();
|
||||
|
||||
var filterStatement = filter.Statements.FirstOrDefault(f => f.Field == FilterField.SeriesName);
|
||||
if (filterStatement == null || string.IsNullOrWhiteSpace(filterStatement.Value))
|
||||
return await query
|
||||
.ProjectTo<BookmarkDto>(_mapper.ConfigurationProvider)
|
||||
.ToListAsync();
|
||||
|
||||
var queryString = filterStatement.Value.ToNormalized();
|
||||
var filterSeriesQuery = query.Join(_context.Series, b => b.SeriesId, s => s.Id,
|
||||
(bookmark, series) => new BookmarkSeriesPair()
|
||||
{
|
||||
|
@ -397,6 +390,17 @@ public class UserRepository : IUserRepository
|
|||
series = series
|
||||
});
|
||||
|
||||
var filterStatement = filter.Statements.FirstOrDefault(f => f.Field == FilterField.SeriesName);
|
||||
if (filterStatement == null || string.IsNullOrWhiteSpace(filterStatement.Value))
|
||||
{
|
||||
return await ApplyLimit(filterSeriesQuery
|
||||
.Sort(filter.SortOptions)
|
||||
.AsSplitQuery(), filter.LimitTo)
|
||||
.ProjectTo<BookmarkDto>(_mapper.ConfigurationProvider)
|
||||
.ToListAsync();
|
||||
}
|
||||
|
||||
var queryString = filterStatement.Value.ToNormalized();
|
||||
switch (filterStatement.Comparison)
|
||||
{
|
||||
case FilterComparison.Equal:
|
||||
|
@ -429,6 +433,7 @@ public class UserRepository : IUserRepository
|
|||
|| s.series.LocalizedName != queryString
|
||||
|| s.series.SortName != queryString);
|
||||
break;
|
||||
case FilterComparison.MustContains:
|
||||
case FilterComparison.NotContains:
|
||||
case FilterComparison.GreaterThan:
|
||||
case FilterComparison.GreaterThanEqual:
|
||||
|
@ -443,8 +448,6 @@ public class UserRepository : IUserRepository
|
|||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return await ApplyLimit(filterSeriesQuery
|
||||
.Sort(filter.SortOptions)
|
||||
.AsSplitQuery(), filter.LimitTo)
|
||||
|
@ -458,6 +461,7 @@ public class UserRepository : IUserRepository
|
|||
return limit <= 0 ? query : query.Take(limit);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Fetches the UserId by API Key. This does not include any extra information
|
||||
/// </summary>
|
||||
|
|
|
@ -18,6 +18,7 @@ using API.Entities;
|
|||
using API.Entities.Enums;
|
||||
using API.Entities.Metadata;
|
||||
using API.Entities.Scrobble;
|
||||
using API.Extensions.QueryExtensions.Filtering;
|
||||
using API.Helpers.Converters;
|
||||
using AutoMapper;
|
||||
using CollectionTag = API.Entities.CollectionTag;
|
||||
|
@ -31,6 +32,13 @@ public class AutoMapperProfiles : Profile
|
|||
{
|
||||
public AutoMapperProfiles()
|
||||
{
|
||||
CreateMap<BookmarkSeriesPair, BookmarkDto>()
|
||||
.ForMember(dest => dest.Id, opt => opt.MapFrom(src => src.bookmark.Id))
|
||||
.ForMember(dest => dest.Page, opt => opt.MapFrom(src => src.bookmark.Page))
|
||||
.ForMember(dest => dest.VolumeId, opt => opt.MapFrom(src => src.bookmark.VolumeId))
|
||||
.ForMember(dest => dest.SeriesId, opt => opt.MapFrom(src => src.bookmark.SeriesId))
|
||||
.ForMember(dest => dest.ChapterId, opt => opt.MapFrom(src => src.bookmark.ChapterId))
|
||||
.ForMember(dest => dest.Series, opt => opt.MapFrom(src => src.series));
|
||||
CreateMap<LibraryDto, Library>();
|
||||
CreateMap<Volume, VolumeDto>();
|
||||
CreateMap<MangaFile, MangaFileDto>();
|
||||
|
|
|
@ -158,5 +158,6 @@
|
|||
"bad-copy-files-for-download": "Nelze zkopírovat soubory do dočasného stažení archivu adresáře.",
|
||||
"send-to-permission": "Nelze odeslat non-EPUB nebo PDF do zařízení, která nejsou podporována na Kindle",
|
||||
"reading-list-title-required": "Název seznamu čtení nemůže být prázdný",
|
||||
"series-restricted-age-restriction": "Uživatel nemá povoleno sledovat tuto sérii z důvodu věkového omezení"
|
||||
"series-restricted-age-restriction": "Uživatel nemá povoleno sledovat tuto sérii z důvodu věkového omezení",
|
||||
"collection-deleted": "Sbírka smazána"
|
||||
}
|
||||
|
|
|
@ -158,5 +158,6 @@
|
|||
"browse-collections": "Navegar por colecciones",
|
||||
"reading-list-restricted": "La lista de lectura no existe o no tiene acceso",
|
||||
"browse-want-to-read": "Navegar en deseo leer",
|
||||
"want-to-read": "Deseo leer"
|
||||
"want-to-read": "Deseo leer",
|
||||
"collection-deleted": "Colección eliminada"
|
||||
}
|
||||
|
|
|
@ -158,5 +158,6 @@
|
|||
"browse-collections": "Sfoglia per Collezioni",
|
||||
"reading-list-restricted": "L'elenco di lettura non esiste o non hai accesso",
|
||||
"browse-want-to-read": "Sfoglia Vuoi leggere",
|
||||
"want-to-read": "Vuoi leggere"
|
||||
"want-to-read": "Vuoi leggere",
|
||||
"collection-deleted": "Collezione cancellata"
|
||||
}
|
||||
|
|
|
@ -158,5 +158,6 @@
|
|||
"browse-libraries": "라이브러리에서 찾아보기",
|
||||
"unable-to-register-k+": "오류로 인해 라이선스를 등록할 수 없습니다. Kavita+ 지원 문의",
|
||||
"want-to-read": "읽고 싶어요",
|
||||
"browse-want-to-read": "읽고 싶어요에서 찾아보기"
|
||||
"browse-want-to-read": "읽고 싶어요에서 찾아보기",
|
||||
"collection-deleted": "컬렉션이 삭제되었습니다"
|
||||
}
|
||||
|
|
|
@ -156,5 +156,8 @@
|
|||
"query-required": "您必须传递一个查询参数",
|
||||
"scrobble-bad-payload": "Scrobble服务提供商的数据无效",
|
||||
"bad-copy-files-for-download": "无法复制文件至临时下载目录",
|
||||
"progress-must-exist": "用户进程必须存在"
|
||||
"progress-must-exist": "用户进程必须存在",
|
||||
"generic-scrobble-hold": "启用锁定时发生错误",
|
||||
"reset-chapter-lock": "无法重置章节的封面锁",
|
||||
"collection-deleted": "收藏已删除"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue