mirror of
https://github.com/Kareadita/Kavita.git
synced 2025-08-11 09:13:42 -04:00
Epub Weblinks + Localization Changes (#2180)
* Fixed a bug where scan series wasn't ignoring optimizations for chapter metadata updates. Implemented pulling weblinks from epubs. * Fixed localization issue * Translations update from Hosted Weblate (#2179) * Translated using Weblate (French) Currently translated at 8.2% (13 of 158 strings) Translation: Kavita/backend Translate-URL: https://hosted.weblate.org/projects/kavita/backend/fr/ * Translated using Weblate (French) Currently translated at 13.2% (21 of 158 strings) Translation: Kavita/backend Translate-URL: https://hosted.weblate.org/projects/kavita/backend/fr/ * Added translation using Weblate (Japanese) * Added translation using Weblate (Undetermined) * Added translation using Weblate (Thai) * Added translation using Weblate (Chinese (Simplified)) * Added translation using Weblate (Chinese (Simplified)) * Added translation using Weblate (Thai) * Translated using Weblate (Spanish) Currently translated at 1.5% (22 of 1416 strings) Translation: Kavita/ui Translate-URL: https://hosted.weblate.org/projects/kavita/ui/es/ * Translated using Weblate (Dutch) Currently translated at 98.1% (155 of 158 strings) Translation: Kavita/backend Translate-URL: https://hosted.weblate.org/projects/kavita/backend/nl/ * Translated using Weblate (Dutch) Currently translated at 98.1% (155 of 158 strings) Translation: Kavita/backend Translate-URL: https://hosted.weblate.org/projects/kavita/backend/nl/ * Translated using Weblate (Dutch) Currently translated at 8.1% (115 of 1416 strings) Translation: Kavita/ui Translate-URL: https://hosted.weblate.org/projects/kavita/ui/nl/ * Translated using Weblate (Dutch) Currently translated at 8.1% (115 of 1416 strings) Translation: Kavita/ui Translate-URL: https://hosted.weblate.org/projects/kavita/ui/nl/ * Translated using Weblate (Thai) Currently translated at 7.5% (12 of 158 strings) Translation: Kavita/backend Translate-URL: https://hosted.weblate.org/projects/kavita/backend/th/ * Translated using Weblate (Chinese (Simplified)) Currently translated at 5.0% (72 of 1416 strings) Translation: Kavita/ui Translate-URL: https://hosted.weblate.org/projects/kavita/ui/zh_Hans/ * Translated using Weblate (Chinese (Simplified)) Currently translated at 8.2% (13 of 158 strings) Translation: Kavita/backend Translate-URL: https://hosted.weblate.org/projects/kavita/backend/zh_Hans/ * Translated using Weblate (Chinese (Simplified)) Currently translated at 5.6% (80 of 1416 strings) Translation: Kavita/ui Translate-URL: https://hosted.weblate.org/projects/kavita/ui/zh_Hans/ * Added translation using Weblate (Portuguese) * Translated using Weblate (Dutch) Currently translated at 11.4% (162 of 1416 strings) Translation: Kavita/ui Translate-URL: https://hosted.weblate.org/projects/kavita/ui/nl/ * Translated using Weblate (Dutch) Currently translated at 11.4% (162 of 1416 strings) Translation: Kavita/ui Translate-URL: https://hosted.weblate.org/projects/kavita/ui/nl/ * Translated using Weblate (Chinese (Simplified)) Currently translated at 12.0% (19 of 158 strings) Translation: Kavita/backend Translate-URL: https://hosted.weblate.org/projects/kavita/backend/zh_Hans/ * Added translation using Weblate (Italian) * Translated using Weblate (Dutch) Currently translated at 12.6% (179 of 1416 strings) Translation: Kavita/ui Translate-URL: https://hosted.weblate.org/projects/kavita/ui/nl/ * Translated using Weblate (Dutch) Currently translated at 12.6% (179 of 1416 strings) Translation: Kavita/ui Translate-URL: https://hosted.weblate.org/projects/kavita/ui/nl/ * Translated using Weblate (Thai) Currently translated at 2.3% (33 of 1416 strings) Translation: Kavita/ui Translate-URL: https://hosted.weblate.org/projects/kavita/ui/th/ * Translated using Weblate (Thai) Currently translated at 2.3% (33 of 1416 strings) Translation: Kavita/ui Translate-URL: https://hosted.weblate.org/projects/kavita/ui/th/ * Translated using Weblate (Portuguese) Currently translated at 0.6% (1 of 158 strings) Translation: Kavita/backend Translate-URL: https://hosted.weblate.org/projects/kavita/backend/pt/ * Translated using Weblate (Italian) Currently translated at 40.5% (64 of 158 strings) Translation: Kavita/backend Translate-URL: https://hosted.weblate.org/projects/kavita/backend/it/ * Translated using Weblate (French) Currently translated at 15.8% (25 of 158 strings) Translation: Kavita/backend Translate-URL: https://hosted.weblate.org/projects/kavita/backend/fr/ * Translated using Weblate (Thai) Currently translated at 4.8% (69 of 1416 strings) Translation: Kavita/ui Translate-URL: https://hosted.weblate.org/projects/kavita/ui/th/ * Translated using Weblate (Portuguese) Currently translated at 89.8% (142 of 158 strings) Translation: Kavita/backend Translate-URL: https://hosted.weblate.org/projects/kavita/backend/pt/ * Translated using Weblate (Italian) Currently translated at 67.7% (107 of 158 strings) Translation: Kavita/backend Translate-URL: https://hosted.weblate.org/projects/kavita/backend/it/ * Translated using Weblate (Spanish) Currently translated at 5.1% (73 of 1416 strings) Translation: Kavita/ui Translate-URL: https://hosted.weblate.org/projects/kavita/ui/es/ * Translated using Weblate (Dutch) Currently translated at 12.8% (182 of 1416 strings) Translation: Kavita/ui Translate-URL: https://hosted.weblate.org/projects/kavita/ui/nl/ * Translated using Weblate (Spanish) Currently translated at 12.8% (182 of 1416 strings) Translation: Kavita/ui Translate-URL: https://hosted.weblate.org/projects/kavita/ui/es/ --------- Co-authored-by: Francois Wilhelmy <ice_mouton@hotmail.com> Co-authored-by: 周書丞 <tmrsm_chan@hotmail.com> Co-authored-by: 书签 <shuqian.emu@gmail.com> Co-authored-by: AlienHack <the4got10@windowslive.com> Co-authored-by: NeneNeko <lennon.rin@gmail.com> Co-authored-by: Toto Saurio <totosaurio3279@gmail.com> Co-authored-by: Stijn <stijn.biemans@gmail.com> Co-authored-by: Hans Kalisvaart <hans.kalisvaart@gmail.com> Co-authored-by: Duarte Silva <smallflake@protonmail.com> Co-authored-by: stan xu <fatexsd@gmail.com> Co-authored-by: Tomas Battistini <tomas.battistini@gmail.com> Co-authored-by: majora2007 <kavitareader@gmail.com> Co-authored-by: zeedif <carlos_antonio-rl@hotmail.com> * Removed a blank API localization file --------- Co-authored-by: Weblate (bot) <hosted@weblate.org> Co-authored-by: Francois Wilhelmy <ice_mouton@hotmail.com> Co-authored-by: 周書丞 <tmrsm_chan@hotmail.com> Co-authored-by: 书签 <shuqian.emu@gmail.com> Co-authored-by: AlienHack <the4got10@windowslive.com> Co-authored-by: NeneNeko <lennon.rin@gmail.com> Co-authored-by: Toto Saurio <totosaurio3279@gmail.com> Co-authored-by: Stijn <stijn.biemans@gmail.com> Co-authored-by: Hans Kalisvaart <hans.kalisvaart@gmail.com> Co-authored-by: Duarte Silva <smallflake@protonmail.com> Co-authored-by: stan xu <fatexsd@gmail.com> Co-authored-by: Tomas Battistini <tomas.battistini@gmail.com> Co-authored-by: majora2007 <kavitareader@gmail.com> Co-authored-by: zeedif <carlos_antonio-rl@hotmail.com>
This commit is contained in:
parent
298556cc4b
commit
a550312279
@ -322,7 +322,7 @@ public class SeriesController : BaseApiController
|
|||||||
[HttpPost("scan")]
|
[HttpPost("scan")]
|
||||||
public ActionResult ScanSeries(RefreshSeriesDto refreshSeriesDto)
|
public ActionResult ScanSeries(RefreshSeriesDto refreshSeriesDto)
|
||||||
{
|
{
|
||||||
_taskScheduler.ScanSeries(refreshSeriesDto.LibraryId, refreshSeriesDto.SeriesId, refreshSeriesDto.ForceUpdate);
|
_taskScheduler.ScanSeries(refreshSeriesDto.LibraryId, refreshSeriesDto.SeriesId, true);
|
||||||
return Ok();
|
return Ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -455,17 +455,32 @@ public class BookService : IBookService
|
|||||||
};
|
};
|
||||||
ComicInfo.CleanComicInfo(info);
|
ComicInfo.CleanComicInfo(info);
|
||||||
|
|
||||||
foreach (var identifier in epubBook.Schema.Package.Metadata.Identifiers.Where(id => !string.IsNullOrEmpty(id.Scheme) && id.Scheme.Equals("ISBN")))
|
var weblinks = new List<string>();
|
||||||
|
foreach (var identifier in epubBook.Schema.Package.Metadata.Identifiers)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(identifier.Identifier)) continue;
|
if (string.IsNullOrEmpty(identifier.Identifier)) continue;
|
||||||
var isbn = identifier.Identifier.Replace("urn:isbn:", string.Empty).Replace("isbn:", string.Empty);
|
if (!string.IsNullOrEmpty(identifier.Scheme) && identifier.Scheme.Equals("ISBN", StringComparison.InvariantCultureIgnoreCase))
|
||||||
if (!ArticleNumberHelper.IsValidIsbn10(isbn) && !ArticleNumberHelper.IsValidIsbn13(isbn))
|
|
||||||
{
|
{
|
||||||
_logger.LogDebug("[BookService] {File} has invalid ISBN number", filePath);
|
var isbn = identifier.Identifier.Replace("urn:isbn:", string.Empty).Replace("isbn:", string.Empty);
|
||||||
continue;
|
if (!ArticleNumberHelper.IsValidIsbn10(isbn) && !ArticleNumberHelper.IsValidIsbn13(isbn))
|
||||||
|
{
|
||||||
|
_logger.LogDebug("[BookService] {File} has invalid ISBN number", filePath);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
info.Isbn = isbn;
|
||||||
}
|
}
|
||||||
info.Isbn = isbn;
|
|
||||||
break;
|
if ((!string.IsNullOrEmpty(identifier.Scheme) && identifier.Scheme.Equals("URL", StringComparison.InvariantCultureIgnoreCase)) ||
|
||||||
|
identifier.Identifier.StartsWith("url:"))
|
||||||
|
{
|
||||||
|
var url = identifier.Identifier.Replace("url:", string.Empty);
|
||||||
|
weblinks.Add(url.Trim());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (weblinks.Count > 0)
|
||||||
|
{
|
||||||
|
info.Web = string.Join(',', weblinks.Distinct());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse tags not exposed via Library
|
// Parse tags not exposed via Library
|
||||||
|
@ -36,7 +36,7 @@ public interface IProcessSeries
|
|||||||
void UpdateVolumes(Series series, IList<ParserInfo> parsedInfos, bool forceUpdate = false);
|
void UpdateVolumes(Series series, IList<ParserInfo> parsedInfos, bool forceUpdate = false);
|
||||||
void UpdateChapters(Series series, Volume volume, IList<ParserInfo> parsedInfos, bool forceUpdate = false);
|
void UpdateChapters(Series series, Volume volume, IList<ParserInfo> parsedInfos, bool forceUpdate = false);
|
||||||
void AddOrUpdateFileForChapter(Chapter chapter, ParserInfo info, bool forceUpdate = false);
|
void AddOrUpdateFileForChapter(Chapter chapter, ParserInfo info, bool forceUpdate = false);
|
||||||
void UpdateChapterFromComicInfo(Chapter chapter, ComicInfo? comicInfo);
|
void UpdateChapterFromComicInfo(Chapter chapter, ComicInfo? comicInfo, bool forceUpdate = false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -534,11 +534,11 @@ public class ProcessSeries : IProcessSeries
|
|||||||
foreach (var chapter in volume.Chapters)
|
foreach (var chapter in volume.Chapters)
|
||||||
{
|
{
|
||||||
var firstFile = chapter.Files.MinBy(x => x.Chapter);
|
var firstFile = chapter.Files.MinBy(x => x.Chapter);
|
||||||
if (firstFile == null || _cacheHelper.IsFileUnmodifiedSinceCreationOrLastScan(chapter, false, firstFile)) continue;
|
if (firstFile == null || _cacheHelper.IsFileUnmodifiedSinceCreationOrLastScan(chapter, forceUpdate, firstFile)) continue;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var firstChapterInfo = infos.SingleOrDefault(i => i.FullFilePath.Equals(firstFile.FilePath));
|
var firstChapterInfo = infos.SingleOrDefault(i => i.FullFilePath.Equals(firstFile.FilePath));
|
||||||
UpdateChapterFromComicInfo(chapter, firstChapterInfo?.ComicInfo);
|
UpdateChapterFromComicInfo(chapter, firstChapterInfo?.ComicInfo, forceUpdate);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@ -660,12 +660,12 @@ public class ProcessSeries : IProcessSeries
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateChapterFromComicInfo(Chapter chapter, ComicInfo? comicInfo)
|
public void UpdateChapterFromComicInfo(Chapter chapter, ComicInfo? comicInfo, bool forceUpdate = false)
|
||||||
{
|
{
|
||||||
if (comicInfo == null) return;
|
if (comicInfo == null) return;
|
||||||
var firstFile = chapter.Files.MinBy(x => x.Chapter);
|
var firstFile = chapter.Files.MinBy(x => x.Chapter);
|
||||||
if (firstFile == null ||
|
if (firstFile == null ||
|
||||||
_cacheHelper.IsFileUnmodifiedSinceCreationOrLastScan(chapter, false, firstFile)) return;
|
_cacheHelper.IsFileUnmodifiedSinceCreationOrLastScan(chapter, forceUpdate, firstFile)) return;
|
||||||
|
|
||||||
_logger.LogTrace("[ScannerService] Read ComicInfo for {File}", firstFile.FilePath);
|
_logger.LogTrace("[ScannerService] Read ComicInfo for {File}", firstFile.FilePath);
|
||||||
|
|
||||||
|
@ -258,7 +258,7 @@ public class ScannerService : IScannerService
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
await _processSeries.ProcessSeriesAsync(parsedFiles, library);
|
await _processSeries.ProcessSeriesAsync(parsedFiles, library, bypassFolderOptimizationChecks);
|
||||||
parsedSeries.Add(foundParsedSeries, parsedFiles);
|
parsedSeries.Add(foundParsedSeries, parsedFiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
<img class="me-1" [ngSrc]="review.provider | providerImage" width="20" height="20" alt="">
|
<img class="me-1" [ngSrc]="review.provider | providerImage" width="20" height="20" alt="">
|
||||||
</ng-template>
|
</ng-template>
|
||||||
{{(isMyReview ? '' : review.username | defaultValue:'')}}
|
{{(isMyReview ? '' : review.username | defaultValue:'')}}
|
||||||
<span style="float: right" *ngIf="review.isExternal">{{t('rating-percentage', {r: review.score})}}%</span>
|
<span style="float: right" *ngIf="review.isExternal">{{t('rating-percentage', {r: review.score})}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -951,7 +951,8 @@
|
|||||||
"less-than-hour": "<1 Hour",
|
"less-than-hour": "<1 Hour",
|
||||||
"range-hours": "{{value}} {{hourWord}}",
|
"range-hours": "{{value}} {{hourWord}}",
|
||||||
"hour": "Hour",
|
"hour": "Hour",
|
||||||
"hours": "Hours"
|
"hours": "Hours",
|
||||||
|
"read-time-title": "{{series-info-cards.read-time-title}}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"series-info-cards": {
|
"series-info-cards": {
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
"name": "GPL-3.0",
|
"name": "GPL-3.0",
|
||||||
"url": "https://github.com/Kareadita/Kavita/blob/develop/LICENSE"
|
"url": "https://github.com/Kareadita/Kavita/blob/develop/LICENSE"
|
||||||
},
|
},
|
||||||
"version": "0.7.6.2"
|
"version": "0.7.6.5"
|
||||||
},
|
},
|
||||||
"servers": [
|
"servers": [
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user