Stremio / stremio-addon-sdk

🧙 A Node.js SDK for creating and publishing Stremio add-ons
https://www.stremio.com/addon-sdk
MIT License
693 stars 182 forks source link

The `extra.filename` property is missing from the callback argument of the `defineSubtitlesHandler` method. #289

Open wujekbogdan opened 4 months ago

wujekbogdan commented 4 months ago

According to the defineSubtitlesHandler docs documentation, the callback function's argument should include an extra.filename property. While the extra object is present, it only contains videoHash and videoSize, vut filename is always undefined.

builder.defineSubtitlesHandler((args) => {
  console.log(args.extra.filename); // undefined
  // ...
})
jaruba commented 4 months ago

what stremio client app are you using for tests? what platform is it from? what version is the app?

the extra properties may or may not be included depending on the app and its capabilities, wether it is connected to a local streaming server or not, this is why it is called "extra", but we cannot assist or investigate without knowing the exact platform and app version that is making the requests to the addon

wujekbogdan commented 4 months ago

// EDIT: I've just tried a few public domain movies, and the filename property is there.

dexter21767-dev commented 4 months ago

I've just tried a few public domain movies, and the filename property is there.

@wujekbogdan the desktop app has built-in local streaming server. the streaming server is responsible for making torrents streamable. and while it's doing that it also gets the filename from the torrent which is passed to the subtitles addon. but for HTTP streams, the addon that returns the stream is responsible for providing the filename.

Torrentio / public domain movies addons provide torrents. while Torrentio + RD provides HTTP streams.

wujekbogdan commented 4 months ago

Does it mean then it is technically impossible to retrieve files names from HTTP streams or is it just outside Streamio control and has to be addressed by the plugin developer?

wujekbogdan commented 4 weeks ago

Let me bump the thread. I found a similar issue here: https://github.com/mhdzumair/MediaFusion/issues/214.

From what I understand, it's not that HTTP streams can't provide the file name; it seems that this feature is missing in stremio-core, but it’s technically feasible. Am I right? Should I report the issue on streamio-core?