jwueller / jellyfin-plugin-onepace

Jellyfin metadata and cover art integration for the https://onepace.net/ project
https://onepace.net/
GNU General Public License v3.0
57 stars 3 forks source link

<' is an invalid start of a value #71

Open anthonymag opened 1 week ago

anthonymag commented 1 week ago

I am having trouble retrieving metadata for One Pace.

I have the One Pace plugin as the top choice for all metadata options in my anime library (which already existed and has other shows in it as well).

I did notice some errors in the logs when I try to do a force metadata replacement:


[17:00:58] [ERR] [27] MediaBrowser.Providers.TV.EpisodeMetadataService: Error in One Pace
System.Text.Json.JsonReaderException: '<' is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0.
   at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
   at System.Text.Json.Utf8JsonReader.ConsumeValue(Byte marker)
   at System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte first)
   at System.Text.Json.Utf8JsonReader.ReadSingleSegment()
   at System.Text.Json.JsonDocument.Parse(ReadOnlySpan`1 utf8JsonSpan, JsonReaderOptions readerOptions, MetadataDb& database, StackRowStack& stack)
   at System.Text.Json.JsonDocument.Parse(ReadOnlyMemory`1 utf8Json, JsonReaderOptions readerOptions, Byte[] extraRentedArrayPoolBytes, PooledByteBufferWriter extraPooledByteBufferWriter)
   at System.Text.Json.JsonDocument.ParseAsyncCore(Stream utf8Json, JsonDocumentOptions options, CancellationToken cancellationToken)
   at JWueller.Jellyfin.OnePace.WebRepository.<>c__DisplayClass6_0.<<QueryGraphQlAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.Extensions.Caching.Memory.CacheExtensions.GetOrCreateAsync[TItem](IMemoryCache cache, Object key, Func`2 factory)
   at JWueller.Jellyfin.OnePace.WebRepository.QueryGraphQlAsync(String query, CancellationToken cancellationToken)
   at JWueller.Jellyfin.OnePace.WebRepository.FetchMetadataAsync(CancellationToken cancellationToken)
   at JWueller.Jellyfin.OnePace.WebRepository.FindAllEpisodesAsync(CancellationToken cancellationToken)
   at JWueller.Jellyfin.OnePace.EpisodeIdentifier.IdentifyAsync(IRepository repository, ItemLookupInfo itemLookupInfo, CancellationToken cancellationToken)
   at JWueller.Jellyfin.OnePace.EpisodeProvider.GetMetadata(EpisodeInfo info, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.MetadataService`2.ExecuteRemoteProviders(MetadataResult`1 temp, String logName, Boolean replaceData, TIdType id, IEnumerable`1 providers, CancellationToken cancellationToken)
[17:00:58] [ERR] [27] MediaBrowser.Providers.Manager.ProviderManager: EpisodeImageProvider failed in GetImageInfos for type Episode at /media/anime/One Pace/[One Pace][8-21] Orange Town [1080p]/[One Pace][12-19] Orange Town 02 [1080p][C0A5D51D].mkv
System.Text.Json.JsonReaderException: '<' is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0.
   at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
   at System.Text.Json.Utf8JsonReader.ConsumeValue(Byte marker)
   at System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte first)
   at System.Text.Json.Utf8JsonReader.ReadSingleSegment()
   at System.Text.Json.JsonDocument.Parse(ReadOnlySpan`1 utf8JsonSpan, JsonReaderOptions readerOptions, MetadataDb& database, StackRowStack& stack)
   at System.Text.Json.JsonDocument.Parse(ReadOnlyMemory`1 utf8Json, JsonReaderOptions readerOptions, Byte[] extraRentedArrayPoolBytes, PooledByteBufferWriter extraPooledByteBufferWriter)
   at System.Text.Json.JsonDocument.ParseAsyncCore(Stream utf8Json, JsonDocumentOptions options, CancellationToken cancellationToken)
   at JWueller.Jellyfin.OnePace.WebRepository.<>c__DisplayClass6_0.<<QueryGraphQlAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.Extensions.Caching.Memory.CacheExtensions.GetOrCreateAsync[TItem](IMemoryCache cache, Object key, Func`2 factory)
   at JWueller.Jellyfin.OnePace.WebRepository.QueryGraphQlAsync(String query, CancellationToken cancellationToken)
   at JWueller.Jellyfin.OnePace.WebRepository.FetchMetadataAsync(CancellationToken cancellationToken)
   at JWueller.Jellyfin.OnePace.WebRepository.FindAllEpisodesAsync(CancellationToken cancellationToken)
   at JWueller.Jellyfin.OnePace.EpisodeIdentifier.IdentifyAsync(IRepository repository, ItemLookupInfo itemLookupInfo, CancellationToken cancellationToken)
   at JWueller.Jellyfin.OnePace.EpisodeImageProvider.GetImages(BaseItem item, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.ProviderManager.GetImages(BaseItem item, IRemoteImageProvider provider, String preferredLanguage, Boolean includeAllLanguages, CancellationToken cancellationToken, Nullable`1 type)
[17:00:58] [ERR] [27] Jellyfin.Plugin.Tvdb.Providers.TvdbEpisodeImageProvider: Episode nullx19 not found for series 360920:One Page Love
[17:00:58] [ERR] [27] MediaBrowser.Providers.TV.SeriesMetadataService: Error in One Pace
System.Text.Json.JsonReaderException: '<' is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0.
   at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
   at System.Text.Json.Utf8JsonReader.ConsumeValue(Byte marker)
   at System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte first)
   at System.Text.Json.Utf8JsonReader.ReadSingleSegment()
   at System.Text.Json.JsonDocument.Parse(ReadOnlySpan`1 utf8JsonSpan, JsonReaderOptions readerOptions, MetadataDb& database, StackRowStack& stack)
   at System.Text.Json.JsonDocument.Parse(ReadOnlyMemory`1 utf8Json, JsonReaderOptions readerOptions, Byte[] extraRentedArrayPoolBytes, PooledByteBufferWriter extraPooledByteBufferWriter)
   at System.Text.Json.JsonDocument.ParseAsyncCore(Stream utf8Json, JsonDocumentOptions options, CancellationToken cancellationToken)
   at JWueller.Jellyfin.OnePace.WebRepository.<>c__DisplayClass6_0.<<QueryGraphQlAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.Extensions.Caching.Memory.CacheExtensions.GetOrCreateAsync[TItem](IMemoryCache cache, Object key, Func`2 factory)
   at JWueller.Jellyfin.OnePace.WebRepository.QueryGraphQlAsync(String query, CancellationToken cancellationToken)
   at JWueller.Jellyfin.OnePace.WebRepository.FetchMetadataAsync(CancellationToken cancellationToken)
   at JWueller.Jellyfin.OnePace.WebRepository.FindSeriesAsync(CancellationToken cancellationToken)
   at JWueller.Jellyfin.OnePace.SeriesIdentifier.IdentifyAsync(IRepository repository, ItemLookupInfo itemLookupInfo, CancellationToken cancellationToken)
   at JWueller.Jellyfin.OnePace.SeriesProvider.GetMetadata(SeriesInfo info, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.MetadataService`2.ExecuteRemoteProviders(MetadataResult`1 temp, String logName, Boolean replaceData, TIdType id, IEnumerable`1 providers, CancellationToken cancellationToken)
[17:00:58] [ERR] [27] MediaBrowser.Providers.Manager.ProviderManager: SeriesImageProvider failed in GetImageInfos for type Series at /media/anime/One Pace
System.Text.Json.JsonReaderException: '<' is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0.
   at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
   at System.Text.Json.Utf8JsonReader.ConsumeValue(Byte marker)
   at System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte first)
   at System.Text.Json.Utf8JsonReader.ReadSingleSegment()
   at System.Text.Json.JsonDocument.Parse(ReadOnlySpan`1 utf8JsonSpan, JsonReaderOptions readerOptions, MetadataDb& database, StackRowStack& stack)
   at System.Text.Json.JsonDocument.Parse(ReadOnlyMemory`1 utf8Json, JsonReaderOptions readerOptions, Byte[] extraRentedArrayPoolBytes, PooledByteBufferWriter extraPooledByteBufferWriter)
   at System.Text.Json.JsonDocument.ParseAsyncCore(Stream utf8Json, JsonDocumentOptions options, CancellationToken cancellationToken)
   at JWueller.Jellyfin.OnePace.WebRepository.<>c__DisplayClass6_0.<<QueryGraphQlAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.Extensions.Caching.Memory.CacheExtensions.GetOrCreateAsync[TItem](IMemoryCache cache, Object key, Func`2 factory)
   at JWueller.Jellyfin.OnePace.WebRepository.QueryGraphQlAsync(String query, CancellationToken cancellationToken)
   at JWueller.Jellyfin.OnePace.WebRepository.FetchMetadataAsync(CancellationToken cancellationToken)
   at JWueller.Jellyfin.OnePace.WebRepository.FindSeriesAsync(CancellationToken cancellationToken)
   at JWueller.Jellyfin.OnePace.SeriesIdentifier.IdentifyAsync(IRepository repository, ItemLookupInfo itemLookupInfo, CancellationToken cancellationToken)
   at JWueller.Jellyfin.OnePace.SeriesImageProvider.GetImages(BaseItem item, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.ProviderManager.GetImages(BaseItem item, IRemoteImageProvider provider, String preferredLanguage, Boolean includeAllLanguages, CancellationToken cancellationToken, Nullable`1 type)
[17:01:00] [INF] [27] Emby.Server.Implementations.ScheduledTasks.TaskManager: Webhook Item Added Notifier Completed after 0 minute(s) and 0 seconds

Jellyfin is setting this show as what it is finding (only for the show and show image though. The season folders and episodes are not matching): https://thetvdb.com/series/one-page-love

This is my file structure:

root@jellyfintemp:/media/anime/One Pace/[One Pace][1-7] Romance Dawn [1080p]# ls -l
total 1730982
-rwxrwxrwx 1 3000 1000 379583882 Jul  1 16:26 '[One Pace][1] Romance Dawn 01 [1080p][FB72C13F].mkv'
-rwxrwxrwx 1 3000 1000 435462906 Jul  1 16:26 '[One Pace][2] Romance Dawn 02 [1080p][667784D2].mkv'
-rwxrwxrwx 1 3000 1000 565965310 Jul  1 16:26 '[One Pace][3-5] Romance Dawn 03 [1080p][8F0ACC44].mkv'
-rwxrwxrwx 1 3000 1000 394520512 Jul  1 16:26 '[One Pace][5-7] Romance Dawn 04 [1080p][9A48E3EB].mkv'
root@jellyfintemp:/media/anime/One Pace/[One Pace][8-21] Orange Town [1080p]# ls -l
total 1952189
-rwxrwxrwx 1 3000 1000 864227285 Jul  1 16:27 '[One Pace][12-19] Orange Town 02 [1080p][C0A5D51D].mkv'
-rwxrwxrwx 1 3000 1000 525077831 Jul  1 16:28 '[One Pace][19-21] Orange Town 03 [1080p][86CC0CCF].mkv'
-rwxrwxrwx 1 3000 1000 611840339 Jul  1 16:28 '[One Pace][8-11] Orange Town 01 [1080p][2388DB63].mkv'

I did notice that those hex values in the file names don't match what the README has in their examples. Not sure if this matters?

jwueller commented 6 days ago

It seems that this is caused by https://onepace.net/ currently having issues. I'll see if I can at least improve error handling for this case if this happens again in the future.

Polydoros95 commented 1 day ago

Hi hab das selbe Problem, wollte OnePace jetzt auch hübsch haben. Solange die Website nicht online ist, gibts dadurch nur falsche metadaten?