i96751414 / plugin.video.torrest

Torrest plugin for Kodi
MIT License
27 stars 6 forks source link

How to properly call Torrest to play without Kodi crashing? #17

Closed ponchofcult closed 2 years ago

ponchofcult commented 2 years ago

Hello there, @i96751414 and everyone that reads this, I have a problem when adding torrest support with my addon, either using url, a file or a magnet link, this makes kodi crash, however this only happens when I use PlayMedia since with RunPlugin it works as in theory it should work and it starts to load the buffer, only logically at the end it doesn't play my file. I suppose that if one way works the other way it should too but when I start loading the file the loading wheels freeze and Kodi crashes, also if I add the files manually it works as it should so it's not a ram memory thing either since this also happens to me not only with windows, also with android tv I leave my log and a small fragment of my code that in theory should work unless I have forgotten something, thanks in advance.

LOG: https://paste.kodi.tv/fubiqalupe.kodi MY CODE: ' url = "https://cdn.pizza/torrents/peliculas/145524_-1610710531-Greenland-El-Ultimo-Refugio--2020---BluRayRip-AC3-5-1.torrent" xbmc.executebuiltin( "PlayMedia("+"plugin://plugin.video.torrest/play_url?url=%s" % url + ")" ) '

i96751414 commented 2 years ago

Hi, PlayMedia is in fact used in torrest plugin, so there are no reasons this should not work: https://github.com/i96751414/plugin.video.torrest/blob/ea8b063300890814ce8d190f5493797721248256/lib/navigation.py#L84

One thing you should do, however, is to quote your URL before passing it to play_url.

Please give it a try and then tell me how it goes.