artist mode functional (?)
This commit is contained in:
parent
a51e15fd0b
commit
90ea90cf37
2 changed files with 3 additions and 1 deletions
|
@ -45,6 +45,8 @@ def get_mode(url):
|
|||
return 'track'
|
||||
if path.startswith('/album/'):
|
||||
return 'album'
|
||||
if path == '/':
|
||||
return 'artist'
|
||||
raise ValueError('unsupported url: "{}"'.format(path))
|
||||
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ def visit_artist(b, url):
|
|||
b.find_by_css('.square a')
|
||||
if link['href'] and '/album/' in link['href']]
|
||||
nonalbumtrack_urls = [link['href'] for link in
|
||||
b.find_by_css('.square a')
|
||||
b.find_by_css('.track_row_view a')
|
||||
if link['href'] and '/track/' in link['href']]
|
||||
log.debug('Found %d album + %d non-album tracks' % (len(album_urls),
|
||||
len(nonalbumtrack_urls)
|
||||
|
|
Loading…
Reference in a new issue