Fix loading the "Systemabsturz" artist page
This commit is contained in:
2 files changed
+10
-1
No files matched your search
@@ -8,7 +8,7 @@
|
||||
|
||||
int main() {
|
||||
const auto ytm = YTMusic();
|
||||
const auto results = ytm.search("y2ECgOhoDGs");
|
||||
const auto results = ytm.search("Systemabsturz");
|
||||
|
||||
std::cout << "Found " << results.size() << " results." << std::endl;
|
||||
|
||||
@@ -55,6 +55,12 @@ int main() {
|
||||
if (playlist.lyrics) {
|
||||
ytm.get_lyrics(*playlist.lyrics);
|
||||
}
|
||||
} else if (!arg.artists.empty()) {
|
||||
for (const meta::Artist &artist : arg.artists) {
|
||||
if (artist.id) {
|
||||
ytm.get_artist(*artist.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
std::cout << "non exaustive visitor" << std::endl;
|
||||
|
||||
@@ -205,6 +205,9 @@ playlist::Track extract_playlist_track(py::handle track) {
|
||||
}
|
||||
|
||||
artist::Artist::Song::Album extract_song_album(py::handle album) {
|
||||
if (album["id"].is_none()) {
|
||||
return {};
|
||||
}
|
||||
return {
|
||||
album["name"].cast<std::string>(),
|
||||
album["id"].cast<std::string>()
|
||||
|
||||
Reference in new issue
Block a user