fallback for artist name in youtube
This commit is contained in:
parent
fe1751a7f3
commit
ec6e55befe
@ -238,6 +238,10 @@ class YouTube(Page):
|
|||||||
for artist_name in music_track["artist"].split(" x "):
|
for artist_name in music_track["artist"].split(" x "):
|
||||||
artist_list.append(Artist(name=artist_name))
|
artist_list.append(Artist(name=artist_name))
|
||||||
|
|
||||||
|
# if all attempts to get a clean artis name (mainly striping topic or getting the stuff in the api) fail, just add an artist with the name of the uploader channel
|
||||||
|
if len(artist_list) == 0:
|
||||||
|
artist_list.append(Artist(_author))
|
||||||
|
|
||||||
return Song(
|
return Song(
|
||||||
title=title,
|
title=title,
|
||||||
source_list=[Source(
|
source_list=[Source(
|
||||||
|
Loading…
Reference in New Issue
Block a user