forked from Ethanscharlie/Happy-Ripper
Fixed small artists
This commit is contained in:
+13
-2
@@ -269,8 +269,11 @@ def rip_worker(rip_queue: list[str], status_callback: Callable):
|
||||
status_callback(f"Downloading content ({on_index})", False)
|
||||
|
||||
download_content(tmp_path, url, MetadataPostProcessor(info, art_path, on_download_finish))
|
||||
if len(os.listdir(tmp_path)) == 0:
|
||||
raise RipError("No content was downloaded")
|
||||
|
||||
filelist = os.listdir(tmp_path)
|
||||
filelist.remove("cover.jpg")
|
||||
if len(filelist) == 0:
|
||||
raise RipError("Nothing ripped, Try again")
|
||||
|
||||
status_callback("Sorting content", False)
|
||||
destinations = sort_into_music(tmp_path, info)
|
||||
@@ -291,6 +294,8 @@ def get_all_playlists_from_channel(browseId: str) -> list[str]:
|
||||
yt = YTMusic()
|
||||
artist = yt.get_artist(browseId)
|
||||
albums_info = artist["albums"]
|
||||
|
||||
if "params" in albums_info:
|
||||
albums = yt.get_artist_albums(
|
||||
albums_info["browseId"],
|
||||
albums_info["params"],
|
||||
@@ -302,6 +307,12 @@ def get_all_playlists_from_channel(browseId: str) -> list[str]:
|
||||
if playlist_id:
|
||||
urls.append(f"https://music.youtube.com/playlist?list={playlist_id}")
|
||||
|
||||
else:
|
||||
for album in artist["albums"]["results"]:
|
||||
playlist_id = album.get("audioPlaylistId")
|
||||
if playlist_id:
|
||||
urls.append(f"https://music.youtube.com/playlist?list={playlist_id}")
|
||||
|
||||
return urls
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user