mhdzumair / MediaFusion

Universal Stremio Add-On
MIT License
180 stars 27 forks source link

Filename Missing in ExtraArgs with Real Debrid #214

Open Nitzantomer1998 opened 2 weeks ago

Nitzantomer1998 commented 2 weeks ago

Hi,

I wanted to let you know that even though it looks like the filename should appear as intended in the commit #0a1c54b, it sadly doesn't work in practice.

As you can see, for the free version, it works fine: Without-RealDebrid

But for the Real Debrid option, the filename isn't sent back: With-RealDebrid

This information is provided from your addon through Stremio. I hope you can find and resolve the problem, as the filename needed to quickly find the suitable subtitle (through a script).

Thank you for the awesome addon!.

Note: I know the both torrents in the video are not identical, i couldn't see it in the free version as it not loaded. but the problem remain the same through all the torrents

If needed information here's Stremio official commit for this change: #60b81f4

mhdzumair commented 2 weeks ago

Ahh, thanks for notifying, I forgot to test the API response data with streaming provider. The issue is behaviorHints value get replaced. Fixed now.

Also note that, in some torrents, the filename is not present at initial stage, This can be happened when it scraped from prowlarr data via magnet link, torrentio api response. In these cases It's responding without file name, we're running magnet scraping in background task so after sometimes it might give you the filename.

image

Nitzantomer1998 commented 2 weeks ago

Thank you for your dedication to this project. Your commitment is much appreciated

TwilightMercy commented 2 weeks ago

Thank you very much! Can you keep the issue open until next MediaFusion 3.9.8 release for updates after testing the final results?

Nitzantomer1998 commented 1 week ago

Hi man, I dont want to push it. But you know when you are about to publish the new release?

mhdzumair commented 1 week ago

Ahh ill publish on this week.

mhdzumair commented 4 days ago

@Nitzantomer1998 could you validate the response and close this issue.

Nitzantomer1998 commented 4 days ago

Sorry It didn’t work…

mhdzumair commented 4 days ago

image

As i mentioned, our database not always contains the filename per torrent, if its scrape it through a magnet link in prowlarr or scrape it through torrentio. So in this case the code changes is behaving as intended.

mhdzumair commented 4 days ago

Closing this issue as completed, will add some schedule task to scrap it back the filenames.

TwilightMercy commented 4 days ago

Hey @mhdzumair ,

Is it possible to not trust the filename scraping, and for RD sources - simply provide the RD Stream URL? (And the subtitles addon will parse the filename from it)?

Example: https://xxx.download.real-debrid.com/d/USER_API_KEY/The.Avengers.2012.720p.BluRay.x264.YIFY.mp4

mhdzumair commented 4 days ago

Is it possible to not trust the filename scraping, and for RD sources - simply provide the RD Stream URL? (And the subtitles addon will parse the filename from it)

It's not possible to give the rd link at time of sending the /stream response. Otherwise, we have to download every single torrent into RD. it's not a feasible solution.

TwilightMercy commented 4 days ago

It's not possible to give the rd link at time of sending the /stream response. Otherwise, we have to download every single torrent into RD. it's not a feasible solution.

If only magnet link is available, maybe send the selected Torrent name in sources display as filename arg?

mhdzumair commented 4 days ago

how the subtitles addon getting the data? With just a filename? or any thing get from torrent hash?

mhdzumair commented 4 days ago

i can send the torrent name.

Nitzantomer1998 commented 4 days ago

The information that Stremio provides to Subtitles Addons is only a JSON object containing:

With the filename, I can map the perfect subtitle to the watched content. You can see the structure of the JSON in the first message in this conversation.

I can send the torrent name.

That would be amazing!

mhdzumair commented 4 days ago

Okay i can send you the torrent name if file name is not present. Or you can come up with another idea somthing like sending torrent info hash as filename and then i can create a new api endpoint for getting more information of that torrent info hash or if you could match subtitles with torrent info hash would be the ideal uniqueness for torrent.

Nitzantomer1998 commented 4 days ago

The torrent name should be the match Im looking for, and i guess also other Subtitles addons. Once again thank you

mhdzumair commented 4 days ago

filename: - string, filename of the video file

According to the stremio docs, I thought this would be the file name of inside the torrent file. But if your subtitle addon just looking through the torrent file name, that would be easy for me, and all torrents in our db contains the torrent file name.

Nitzantomer1998 commented 4 days ago

Don't get me wrong, the actual filename of the video would be much better. However, from what I understand, that's not possible right now.

So, I'll use the torrent name. It will still be an improvement over the current state. if the video filename is exist and possible to be returned is much better.

mhdzumair commented 4 days ago

Gotcha will send filename of video if available if not will send the torrent name.