tubearchivist / tubearchivist-jf-plugin

Metadata for your TubeArchivist library on Jellyfin.
GNU General Public License v3.0
104 stars 6 forks source link

Not syncing metadata to Jellyfin #19

Closed DevGoran closed 1 month ago

DevGoran commented 1 month ago

I've read the documentation

Operating System

Linux, Docker

Your Bug Report

Describe the bug

Installed Jellyfin plugin as instructed in readme. However, metadata does not refresh and whos videos in a bunch of random digits and letters. Jellyfin seems to also not be able to access some of the videos (like they are unavailble). API token seems to be matching.

Steps To Reproduce

Installed and configured plugin as described in readme.

Expected behavior

Metadata syncing.

Relevant Jellyfin log output

[2024-07-21 09:12:32.995 +00:00] [ERR] [29] MediaBrowser.Providers.TV.SeriesMetadataService: Error in "TubeArchivist"
System.Net.Http.HttpRequestException: Name or service not known (fqdn.com:443)
 ---> System.Net.Sockets.SocketException (0xFFFDFFFF): Name or service not known
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
   at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|285_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem)
   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at Jellyfin.Plugin.TubeArchivistMetadata.TubeArchivist.TubeArchivistApi.GetChannel(String channelId)
   at Jellyfin.Plugin.TubeArchivistMetadata.Providers.SeriesMetadataProvider.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)

Anything else?

No response

Salvoxia commented 1 month ago

The error

Name or service not known (fqdn.com:443)

indicates the plugin is looking for your TubeArchivist installation at fqdn.com:443. Can you please double-check the plugin settings and make sure the correct URL for TubeArchivist URL is set?

DevGoran commented 1 month ago

Thanks for the fast response. I've replaced the FQDN with IP:port. I see following log entried now in jellyfin:

[2024-07-21 19:55:32.099 +00:00] [INF] [50] Jellyfin.Plugin.TubeArchivistMetadata.Plugin: "http://IP:7000/api/video xeIKoxY52dM/: BadRequest" [2024-07-21 19:55:32.099 +00:00] [INF] [50] Jellyfin.Plugin.TubeArchivistMetadata.Plugin: "Getting images for video: (xeIKoxY52dM)" [2024-07-21 19:55:32.099 +00:00] [INF] [50] Jellyfin.Plugin.TubeArchivistMetadata.Plugin: "Thumb URI: " [2024-07-21 19:55:32.120 +00:00] [INF] [50] Jellyfin.Plugin.TubeArchivistMetadata.Plugin: "http://IP:7000/api/channel/UCMrvLMUITAImCHMOhX88PYQ/: BadRequest" [2024-07-21 19:55:32.121 +00:00] [INF] [50] Jellyfin.Plugin.TubeArchivistMetadata.Plugin: "Getting metadata for channel: (UCMrvLMUITAImCHMOhX88PYQ)" [2024-07-21 19:55:32.121 +00:00] [INF] [50] Jellyfin.Plugin.TubeArchivistMetadata.Plugin: "Received metadata: null"

Salvoxia commented 1 month ago

Hm, is your TubeArchivist installation only reachable for Jellyfin under IP:port or from your local browser as well? If so, just to make sure it's correct, when pasting http://ip:7000/api/video/xeIKoxY52dM/ into your browser you should see something similar to this image

Is that what you get?

DevGoran commented 1 month ago

I can access the instance with IP:port or fqdn. However, the jellyfin docke rinstance seems to only be able to reach the tubearchivist instnance with IP:port. Both jellyfin and tubearchivist are on the same host.

Is that what you get?

Somewhat similar. I get a disallowed host message.

Invalid HTTP_HOST header: 'IP:7000'. You may need to add 'IP' to ALLOWED_HOSTS.

Salvoxia commented 1 month ago

Invalid HTTP_HOST header: 'IP:7000'. You may need to add 'IP' to ALLOWED_HOSTS.

That might be what Jellyfin logs as BadRequest. So it seems that your Jellyfin container is not able to resolve your fqdn (because Docker and/or your container) is not set up to use the DNS server that knows your FQDN entry and something (reverse proxy?) is preventing it from accessing your TubeArchivist instance via IP address.

DevGoran commented 1 month ago

That was it! I just added the DNS key in the docker compose and changed the IP back to the FQDN in the plugin settings. User error and not bug then! Thanks :)