Light Novel Library Type (#2682)
This commit is contained in:
parent
a40c019ddb
commit
8b2649302c
26 changed files with 237 additions and 148 deletions
|
@ -69,7 +69,7 @@ public class ExternalMetadataService : IExternalMetadataService
|
|||
private readonly IMapper _mapper;
|
||||
private readonly ILicenseService _licenseService;
|
||||
private readonly TimeSpan _externalSeriesMetadataCache = TimeSpan.FromDays(30);
|
||||
public static readonly ImmutableArray<LibraryType> NonEligibleLibraryTypes = ImmutableArray.Create<LibraryType>(LibraryType.Comic);
|
||||
public static readonly ImmutableArray<LibraryType> NonEligibleLibraryTypes = ImmutableArray.Create<LibraryType>(LibraryType.Comic, LibraryType.Book);
|
||||
private readonly SeriesDetailPlusDto _defaultReturn = new()
|
||||
{
|
||||
Recommendations = null,
|
||||
|
@ -420,6 +420,7 @@ public class ExternalMetadataService : IExternalMetadataService
|
|||
LibraryType.Manga => seriesFormat == MangaFormat.Epub ? MediaFormat.LightNovel : MediaFormat.Manga,
|
||||
LibraryType.Comic => MediaFormat.Comic,
|
||||
LibraryType.Book => MediaFormat.Book,
|
||||
LibraryType.LightNovel => MediaFormat.LightNovel,
|
||||
_ => MediaFormat.Unknown
|
||||
};
|
||||
}
|
||||
|
|
|
@ -80,6 +80,9 @@ public class ScrobblingService : IScrobblingService
|
|||
private const int ScrobbleSleepTime = 1000; // We can likely tie this to AniList's 90 rate / min ((60 * 1000) / 90)
|
||||
|
||||
private static readonly IList<ScrobbleProvider> BookProviders = new List<ScrobbleProvider>()
|
||||
{
|
||||
};
|
||||
private static readonly IList<ScrobbleProvider> LightNovelProviders = new List<ScrobbleProvider>()
|
||||
{
|
||||
ScrobbleProvider.AniList
|
||||
};
|
||||
|
@ -877,6 +880,12 @@ public class ScrobblingService : IScrobblingService
|
|||
return true;
|
||||
}
|
||||
|
||||
if (readEvent.Series.Library.Type == LibraryType.LightNovel &&
|
||||
LightNovelProviders.Intersect(userProviders).Any())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue