phil65 / skin.estuary

Public repository for the Kodi default skin "Estuary"
Other
26 stars 82 forks source link

Don't close MovieInformation dialog before launching CinemaVision - allow the add-on to do it #197

Closed ruuk closed 7 years ago

ruuk commented 7 years ago

When the dialog is opened from the home window widgets and then closed before the add-on launches, there is no list item info available to the add-on.

This PR leaves the window open, so the add-on can close it after getting the info. It has the added benefit of providing the likely user expected behavior of returning to the info dialog if the add-on dialog is canceled.

If for some reason this solution does not make sense, an alternative would be to pass ListItem.DBType and ListItem.DBID to the add-on. I'm of course open to any other suggestions as well.

Note: sys.listitem (as you've suggested in the past) does not work here (AttributeError) and hasn't worked for me yet. Perhaps it doesn't work for script add-ons?

Thanks!

phil65 commented 7 years ago

sys.listitem only exists for contextmenu add-ons, correct. Passing dbtype and listitem.dbid is indeed the cleanest solution here, so that would be my preferred solution (we can still remove the dialog.close() then ofc in case you want to deal with that on script-side)

ruuk commented 7 years ago

Modified to pass in dbtype and dbid. Still removes the dialog.close()

phil65 commented 7 years ago

Thx!