From: Clinton Ebadi Date: Sun, 26 Apr 2015 01:41:10 +0000 (-0400) Subject: Context Menu: Show Artist Albums X-Git-Url: https://git.hcoop.net/clinton/unknownlamer-kodi-addons.git/commitdiff_plain/9856483ddd6fb3a9114daac8aba8d615be1c9f9b Context Menu: Show Artist Albums Quickly jump to the highlighted item's artist album listing. Handy for party mode. --- diff --git a/context.item.songartist/addon.py b/context.item.songartist/addon.py new file mode 100644 index 0000000..b779a0b --- /dev/null +++ b/context.item.songartist/addon.py @@ -0,0 +1,32 @@ +# Show Song Artist Context Menu (https://git.hcoop.net/?p=clinton/unknownlamer-kodi-addons.git) + +# Copyright (c) 2015 Clinton Ebadi +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import sys +import xbmc +import json + +def main (): + artist = sys.listitem.getMusicInfoTag().getArtist() + artistid = json.loads (xbmc.executeJSONRPC (json.dumps ({ 'jsonrpc': '2.0', + 'id': '1', + 'method': 'AudioLibrary.GetArtists', + 'params': { 'filter': { 'field': 'artist', + 'operator': 'is', + 'value' : artist }}})))['result']['artists'][0]['artistid'] + xbmc.executebuiltin ('ActivateWindow (Music,musicdb://artists/%s/)' % artistid) + +if __name__ == '__main__': + main () diff --git a/context.item.songartist/addon.xml b/context.item.songartist/addon.xml new file mode 100644 index 0000000..5007564 --- /dev/null +++ b/context.item.songartist/addon.xml @@ -0,0 +1,22 @@ + + + + + + + + + + !IsEmpty(ListItem.Artist) + + + + + all + Show albums for song's artist + Show albums for song's artist + GPLv3 or later + https://git.hcoop.net/?p=clinton/unknownlamer-kodi-addons.git + +