[PlayListPlayer] Fix hint on playlist file with multiple paths
[xbmc.git] / addons / metadata.generic.albums / default.py
blobb6876e3bc30275f3fa5ade21f021893d2a85e2da
1 # -*- coding: utf-8 -*-
2 import sys
3 from urllib.parse import parse_qsl
4 from lib.scraper import Scraper
7 class Main:
8 def __init__(self):
9 action, key, artist, album, url, nfo, settings = self._parse_argv()
10 Scraper(action, key, artist, album, url, nfo, settings)
12 def _parse_argv(self):
13 params = dict(parse_qsl(sys.argv[2].lstrip('?')))
14 # actions: find, resolveid, NfoUrl, getdetails
15 action = params['action']
16 # key: musicbrainz id
17 key = params.get('key', '')
18 # artist: artistname
19 artist = params.get('artist', '')
20 # album: albumtitle
21 album = params.get('title', '')
22 # url: provided by the scraper on previous run
23 url = params.get('url', '')
24 # nfo: musicbrainz url from .nfo file
25 nfo = params.get('nfo', '')
26 # path specific settings
27 settings = params.get('pathSettings', {})
28 return action, key, artist, album, url, nfo, settings
31 if (__name__ == '__main__'):
32 Main()