aymene69 / stremio-jackett

Elevate your Stremio experience with seamless access to Jackett torrent links, effortlessly fetching torrents for your selected movies within the Stremio interface.
177 stars 32 forks source link

Add support for Head Method in get_playback #163

Closed mhdzumair closed 1 month ago

mhdzumair commented 1 month ago

Hi @aymene69 Just come across your addon code, Make sure to add head method to Debrid service link resolver function on https://github.com/aymene69/stremio-jackett/blob/ae3118e1f6323f3dff54c5c4486e5762f0e40ec5/source/main.py#L204

This is a huge issue only for elfhosted with current version of stremio server. i have come across this with elfhosted instance for MediaFusion. The real reason is elfhosted traefik strip out the headers. in same time the stremio server hit the media url with HEAD method and expect content-length value, since traefik strip out unsupported method 4xx headers the content-length value is not present and then stremio-server has bug on this, where it will download complete stream data instead of downloading first and last chunk of stream for opensub hash finding. I have resolved the issue however the stremio-server has not yet released, therefore you can simply include this method.

Reference issue: https://github.com/Stremio/stremio-bugs/issues/722

aymene69 commented 1 month ago

Will add it asap

mhdzumair commented 1 month ago

Fyi, you could just add head method fastapi decorator above or below to get method decorator.