B"H browse artists too
This commit is contained in:
parent
a8910096c2
commit
76dad22268
2 changed files with 35 additions and 6 deletions
|
@ -5,11 +5,12 @@ ARTIST = 'artist'
|
|||
PLAYLIST = 'playlist'
|
||||
ALBUM = 'album'
|
||||
DIRECTORY = 'directory'
|
||||
VDIR = 'vdir'
|
||||
PREFIX = 'subidy'
|
||||
ROOT = 'root'
|
||||
SEARCH = 'search'
|
||||
|
||||
ROOT_URI = '%s:%s' % (PREFIX, ROOT)
|
||||
ROOT_URI = '%s:%s:%s' % (PREFIX, VDIR, ROOT)
|
||||
|
||||
regex = re.compile(r'(\w+?):(\w+?)(?::|$)(.+?)?$')
|
||||
|
||||
|
@ -52,6 +53,12 @@ def get_directory_id(uri):
|
|||
return None
|
||||
return result.group(3)
|
||||
|
||||
def get_vdir_id(uri):
|
||||
result = regex.match(uri)
|
||||
if not is_id_result_valid(result, VDIR):
|
||||
return None
|
||||
return result.group(3)
|
||||
|
||||
def get_type(uri):
|
||||
result = regex.match(uri)
|
||||
if not is_type_result_valid(result):
|
||||
|
@ -73,6 +80,9 @@ def get_song_uri(id):
|
|||
def get_directory_uri(id):
|
||||
return get_type_uri(DIRECTORY, id)
|
||||
|
||||
def get_vdir_uri(id):
|
||||
return get_type_uri(VDIR, id)
|
||||
|
||||
def get_playlist_uri(id):
|
||||
return get_type_uri(PLAYLIST, id)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue