Open burekas7 opened 10 months ago
but also shows the "Playback failed" dialog
this is true.
which shouldn't be shown on this option.
but i am not sure that it can be easily fixed without rewriting a lot of code. for "download" we just re-use "play" code, but then we simply close the "player" immediately. see https://github.com/elgatito/elementum/blob/6aea37dab272b523d6ec42dd75ef123031e388d6/api/play.go#L119
By the way, when I choose "Delete torrents and files" from context menu in the Torrents list, does it should show a dialog to confirm? Because it doesn't.
it could, but there is no such code. but i agree - it sounds like a good idea to confirm before delete real files.
but also shows the "Playback failed" dialog
this is true.
which shouldn't be shown on this option.
but i am not sure that it can be easily fixed without rewriting a lot of code. for "download" we just re-use "play" code, but then we simply close the "player" immediately. see https://github.com/elgatito/elementum/blob/6aea37dab272b523d6ec42dd75ef123031e388d6/api/play.go#L119
I understand.
@elgatito What do you think?
I guess that si because context plugin is calling xbmc.Player().play(url)
, which expects a playback to start. So for non-playback actions it should use something else.
@elgatito
so i tried to use RunPlugin()
to avoid this "Playback failed" message
if action == "play":
xbmc.Player().play(url)
else:
xbmc.executebuiltin('RunPlugin("%s")' % url) # to avoid "Playback failed" notification when we do not actually start playback
so it starts burst search but then it does nothing. so in log it stops after
[plugin.video.elementum] Redirecting with code 302 to: plugin://plugin.video.elementum/download?doresume=false&tmdb=1184918&type=movie&uri=magnet...
[plugin.video.elementum] Resolving TMDB item by calling http://127.0.0.1:65220/movie/1184918/infolabels for ['plugin://plugin.video.elementum/movie/1184918/download/...', '-1', '', 'resume:false']
it looks like redirect does not work with RunPlugin.
with xbmc.Player().play(url)
it goes further, for example i see
CScriptRunner: running add-on script Elementum('plugin://plugin.video.elementum/download', '11', '?doresume=false&resume=...&tmdb=1184918&type=movie')
but i am not sure about this. and i am not sure how to overcome this.
@elgatito @antonsoroko
Using the "Download" option from Elementum context menu options start downloading in the background but also shows the "Playback failed" dialog which shouldn't be shown on this option.
Kodi log debug: https://paste.ubuntu.com/p/9yj9zTRQcZ/plain
Elementum 0.1.98 Elementum Context menu: 0.0.13