context.item.songartist: use ActivateWindow to show artist albums
authorClinton Ebadi <clinton@unknownlamer.org>
Fri, 10 Dec 2021 03:03:32 +0000 (22:03 -0500)
committerClinton Ebadi <clinton@unknownlamer.org>
Fri, 10 Dec 2021 03:03:32 +0000 (22:03 -0500)
In Kodi 19.x using Container.Update results in it being impossible to
queue songs if the extension is used when the party mode playlist is
focused. It appears that I should have been using ActivateWindow to
show the artist album listing, which gives the expected behavior
again (extension allows queuing music when used in any context).

context.item.songartist/addon.py

index 9c46e08..5acc87c 100644 (file)
@@ -26,7 +26,7 @@ def main ():
                                                               'params': { 'filter': { 'field': 'artist',
                                                                                       'operator': 'is',
                                                                                       'value' : artist }}})))['result']['artists'][0]['artistid']
-    xbmc.executebuiltin ('Container.Update ("musicdb://artists/%s/")' % artistid)
+    xbmc.executebuiltin ('ActivateWindow (Music, "musicdb://artists/%s/")' % artistid)
 
 if __name__ == '__main__':
     main ()