ShokoAnime / Shokofin

Repository for Shokofin, a plugin that brings Shoko to Jellyfin.
https://shokoanime.com
MIT License
140 stars 17 forks source link

Support differing internal and external domain names #57

Closed Renari closed 2 months ago

Renari commented 3 months ago

Description

My Jellyfin instance runs inside of a docker container and uses internal dns to communicate with shoko.

e.g.

http://shoko-server.ix-shoko-server.svc.cluster.local:8111

Under advanced settings there is an option to set a public Shoko host URL, I thought this could be used for Shoko links so that they pointed to the correct domain outside the container. However it looks like other traffic is trying to be sent to this domain, rather than just links.

e.g.

[2024-06-10 03:19:07.522 -04:00] [WRN] [23] Emby.Server.Implementations.Library.LibraryManager: Cannot fetch image from "https://shoko.mydomain.com/api/v3/Image/Shoko/Staff/1464". Http status code: null

This domain is not accessible inside of the docker container, because the docker container is not using my LAN DNS server, thus the nslookup fails. http://shoko-server.ix-shoko-server.svc.cluster.local is the domain name it should be using for internal requests (between containers), and it seems this is the domain name that gets used if you leave this blank.

So this puts me in an odd scenario where I can choose to have either the Shoko series links broken or have Shokofin requests fail.

Suggested Solution

An option that causes this domain to only be used for links and not be used for requests to the Shoko server.

Additional Information

No response