Skip to content

Commit

Permalink
refactor: Simplify getting artist name in JioSaavnAudioSourceManager
Browse files Browse the repository at this point in the history
  • Loading branch information
appujet committed Jul 28, 2024
1 parent 7b2da86 commit 45bf57f
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,10 @@ private String parseArtist(JsonBrowser json) {
if (artists.isNull()) {
return "Unknown";
}
return artists.values().stream().map(name -> name.get("name").text()).collect(Collectors.joining(", "));
return artists.values().stream()
.map(name -> name.get("name").text())
.findFirst()
.orElse("Unknown");
}

private String cleanString(String text) {
Expand Down

0 comments on commit 45bf57f

Please sign in to comment.