mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-05-21 07:06:33 -04:00
Bugfixes + Potential iOS Webtoon Reader Fix (#2650)
This commit is contained in:
@@ -543,7 +543,7 @@ public static class Parser
|
||||
{
|
||||
// Historys Strongest Disciple Kenichi_v11_c90-98.zip, ...c90.5-100.5
|
||||
new Regex(
|
||||
@"(\b|_)(c|ch)(\.?\s?)(?<Chapter>(\d+(\.\d)?)(-\d+(\.\d)?)?)",
|
||||
@"(\b|_)(c|ch)(\.?\s?)(?<Chapter>(\d+(\.\d)?)(-c?\d+(\.\d)?)?)",
|
||||
MatchOptions, RegexTimeout),
|
||||
// [Suihei Kiki]_Kasumi_Otoko_no_Ko_[Taruby]_v1.1.zip
|
||||
new Regex(
|
||||
@@ -761,6 +761,11 @@ public static class Parser
|
||||
var from = RemoveLeadingZeroes(tokens[0]);
|
||||
if (tokens.Length != 2) return from;
|
||||
|
||||
// Occasionally users will use c01-c02 instead of c01-02, clean any leftover c
|
||||
if (tokens[1].StartsWith("c", StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
tokens[1] = tokens[1].Replace("c", string.Empty, StringComparison.InvariantCultureIgnoreCase);
|
||||
}
|
||||
var to = RemoveLeadingZeroes(hasPart ? AddChapterPart(tokens[1]) : tokens[1]);
|
||||
return $"{from}-{to}";
|
||||
}
|
||||
|
||||
@@ -752,6 +752,8 @@ public class ProcessSeries : IProcessSeries
|
||||
.Where(s => !string.IsNullOrEmpty(s))
|
||||
.Select(s => s.Trim())
|
||||
);
|
||||
|
||||
// For each weblink, try to parse out some MetadataIds and store in the Chapter directly for matching (CBL)
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(comicInfo.Isbn))
|
||||
|
||||
@@ -48,6 +48,7 @@ public interface IVersionUpdaterService
|
||||
Task<UpdateNotificationDto?> CheckForUpdate();
|
||||
Task PushUpdate(UpdateNotificationDto update);
|
||||
Task<IEnumerable<UpdateNotificationDto>> GetAllReleases();
|
||||
Task<int> GetNumberOfReleasesBehind();
|
||||
}
|
||||
|
||||
public class VersionUpdaterService : IVersionUpdaterService
|
||||
@@ -87,6 +88,12 @@ public class VersionUpdaterService : IVersionUpdaterService
|
||||
return updates.Select(CreateDto).Where(d => d != null)!;
|
||||
}
|
||||
|
||||
public async Task<int> GetNumberOfReleasesBehind()
|
||||
{
|
||||
var updates = await GetAllReleases();
|
||||
return updates.TakeWhile(update => update.UpdateVersion != update.CurrentVersion).Count();
|
||||
}
|
||||
|
||||
private UpdateNotificationDto? CreateDto(GithubReleaseMetadata? update)
|
||||
{
|
||||
if (update == null || string.IsNullOrEmpty(update.Tag_Name)) return null;
|
||||
|
||||
Reference in New Issue
Block a user