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:
Joseph Milazzo 2023-12-06 17:59:16 -06:00
parent 0a2604dbd4
commit 7b35990e40
3 changed files with 7 additions and 4 deletions

View file

@ -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;