Stremio / stremio-features

Post Feature requests in Issues here
108 stars 13 forks source link

Error opening torrent from the browser if not running in the background (Android TV) #509

Open moray33 opened 1 year ago

moray33 commented 1 year ago

Stremio can't open a torrent from the browser if Stremio is not running in the background. If you open Stremio, then go to the browser and open the torrent (and the system itself hasn't closed Stremio to free RAM), it opens just fine. But if not, you get an error.

Screenshot: https://pasteboard.co/RXjJ3LG71a2Y.jpg

jaruba commented 1 year ago

This is expected behavior, the browser is not able to stream torrents (this is a technical limitation, the browser won't ever be able to do this), so it is offloaded to Stremio Desktop or Stremio Service when installed and running on the same device.

Although I see that you sent a photo of the Android TV app, not the browser (you said browser though). Regardless, all Stremio apps need the background process running in order to stream torrents. If your Android TV device is killing background processes then you will need to figure out what operating system settings can stop the Android TV OS from killing it..

jaruba commented 1 year ago

It is an interesting case though, what device is that? Is it an older TV with Android TV running on it? (instead of a separate Android TV box) What brand and what model of TV?

moray33 commented 1 year ago

I'm not sure you're understanding my request. I'm not expecting the browser to stream anything. There are some videos you can't find directly on stremio, so I need to use a browser in order to locate a torrent file or magnet link, then open it with Stremio.

A couple of years ago when I started using Stremio (an older version, obviously) it was able to just open the torrents without having to have the app running already. I've just tried on my phone and it doesn't show the error message, but when I try to open the torrent from the browser, it opens Stremio, but it doesn't load the torrent.

Any other program that handles torrents that I've used doesn't need to be running in the background in order to open a torrent, it just initiates whatever process it needs, then loads the torrent. I'd say this shouldn't be expected behaviour.

I use a TV box, it's not old, it's the Mecool KM2 Plus: https://www.mecool.com/products/tv-box-mecool-km2-plus

It doesn't always kill the Stremio process in the background, but it does sometimes, and even when I go and open Stremio back, it kills the browser so I have to search the torrent again... I think mostly when I do if shortly after booting up, probably because it's still loading some stuff. But, anyway, as I said, any other app that handle torrents is able to open them without having to be running in the background first. It would make sense and it would make life easier if Stremio was able to do so as well.

jaruba commented 1 year ago

So when you press a magnet link in the Android TV browser, the app loads the magnet link ONLY if the app is already running in the background? But the Android TV device refuses to open the app (when pressing on the magnet link in a browser) if the app is closed?

And what is the reasoning behind the photo you sent with the error? (as that error seems unrelated to any of this.. it's saying that the streaming server that should be running in the background is not running)

moray33 commented 1 year ago

When I press a magnet link in the Android TV browser, Stremio loads the torrent only if the app is already running in the background, that's correct. If Stremio is closed, when I press the magnet link Stremio opens but shows the error message you can see on the screenshot. (And in the same case on the phone, if Stremio is closed, when I press the magnet link, Stremio opens but that's it, it doesn't load the torrent).

jaruba commented 1 year ago

Thank you for taking the time to explain the issue better, I understand it now and do consider it a valid bug report, it seems like a race condition

moray33 commented 1 year ago

No worries, mate.

jaruba commented 1 year ago

this should be fixed with the new v1.6.3 release: https://blog.stremio.com/stremio-tech-update-23-android-tv-desktop-mobile-fixes/

moray33 commented 1 year ago

I've updated the app to the 1.6.3 version, tried to open a torrent and the error is still happening.

jaruba commented 1 year ago

we will look into it further

moray33 commented 1 year ago

I've noticed it doesn't say anything about this fix on the mobile version. It's probably a common error between both Android version since, like I did say, the mobile version doesn't load magnets either when Stremio is closed, it just doesn't show the error but they don't load anyway. I hope it helps.

jaruba commented 1 year ago

our developers couldn't reproduce your issue on android tv, we only increased the wait time, to give more time for the streaming server to load. what devices are you using?

moray33 commented 1 year ago

Mecool KM2 Plus: https://www.mecool.com/products/tv-box-mecool-km2-plus

And my phone is the Realme 7 Pro