Same case now works for Volumes.
Fixed a bug in the Kavita+ code that wasn't properly parsing out weblinks
This commit is contained in:
parent
0a2604dbd4
commit
7b35990e40
3 changed files with 7 additions and 4 deletions
|
@ -829,12 +829,12 @@ public class ScrobblingService : IScrobblingService
|
|||
if (!webLink.StartsWith(website)) continue;
|
||||
var tokens = webLink.Split(website)[1].Split('/');
|
||||
var value = tokens[index];
|
||||
if (typeof(T) == typeof(int))
|
||||
if (typeof(T) == typeof(int?))
|
||||
{
|
||||
if (int.TryParse(value, out var intValue))
|
||||
return (T)(object)intValue;
|
||||
}
|
||||
else if (typeof(T) == typeof(long))
|
||||
else if (typeof(T) == typeof(long?))
|
||||
{
|
||||
if (long.TryParse(value, out var longValue))
|
||||
return (T)(object)longValue;
|
||||
|
|
|
@ -109,9 +109,9 @@ public static class Parser
|
|||
new Regex(
|
||||
@"(?<Series>.*)(\b|_)v(?<Volume>\d+-?\d+)( |_)",
|
||||
MatchOptions, RegexTimeout),
|
||||
// NEEDLESS_Vol.4_-Simeon_6_v2[SugoiSugoi].rar
|
||||
// Nagasarete Airantou - Vol. 30 Ch. 187.5 - Vol.31 Omake
|
||||
new Regex(
|
||||
@"(?<Series>.*)(\b|_)(?!\[)(vol\.?)(?<Volume>\d+(-\d+)?)(?!\])",
|
||||
@"^(?<Series>.+?)(\s*Chapter\s*\d+)?(\s|_|\-\s)+(Vol(ume)?\.?(\s|_)?)(?<Volume>\d+(\.\d+)?)(.+?|$)",
|
||||
MatchOptions, RegexTimeout),
|
||||
// Historys Strongest Disciple Kenichi_v11_c90-98.zip or Dance in the Vampire Bund v16-17
|
||||
new Regex(
|
||||
|
@ -137,6 +137,7 @@ public static class Parser
|
|||
new Regex(
|
||||
@"(vol_)(?<Volume>\d+(\.\d)?)",
|
||||
MatchOptions, RegexTimeout),
|
||||
|
||||
// Chinese Volume: 第n卷 -> Volume n, 第n册 -> Volume n, 幽游白书完全版 第03卷 天下 or 阿衰online 第1册
|
||||
new Regex(
|
||||
@"第(?<Volume>\d+)(卷|册)",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue