Fix: handling some exception

This commit is contained in:
2025-06-11 17:35:29 +09:00
parent cffae5c3ac
commit 05262283f8
3 changed files with 14 additions and 6 deletions

View File

@@ -36,11 +36,14 @@ public class HitomiDTO {
for (String tag : this.tags.get("tag")) tags += "tag:" + tag + ", ";
}
if (tags.isEmpty()) return "N/A";
return tags.substring(0, tags.length() - 2);
}
public String getArtistsAsString() {
String artists = "";
if (this.artists.isEmpty()) return "N/A";
if (this.artists.size() == 1) return this.artists.get(0);
for (String artist : this.artists) artists += artist + ", ";