Skip to content

Commit

Permalink
Fix lidarr v2 add and lookup artists
Browse files Browse the repository at this point in the history
  • Loading branch information
shayaantx committed Sep 4, 2024
1 parent b10df70 commit 2404a25
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Made this simple multi chat-client bot to access radarr, sonarr, and lidarr with
- [x] Radarr (v4)
- [x] Sonarr (v4)
- [x] Sonarr (v3)
- [x] Lidarr (v2)
- [x] Lidarr (v1)
- [x] Lidarr (v0)
- [x] ~~Radarr (v3) - no longer supported~~
Expand Down
8 changes: 5 additions & 3 deletions src/main/java/com/botdarr/api/lidarr/LidarrArtist.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,11 @@ public String getRemoteImage() {
return lidarrImage.getRemoteUrl();
}
}
for (LidarrImage lidarrImage : this.lastAlbum.getImages()) {
if (lidarrImage.getCoverType().equals("cover") && !Strings.isEmpty(lidarrImage.getUrl())) {
return lidarrImage.getUrl();
if (this.lastAlbum != null) {
for (LidarrImage lidarrImage : this.lastAlbum.getImages()) {
if (lidarrImage.getCoverType().equals("cover") && !Strings.isEmpty(lidarrImage.getUrl())) {
return lidarrImage.getUrl();
}
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/com/botdarr/api/lidarr/LidarrStatistics.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ public void setPercentOfTracks(Double percentOfTracks) {
this.percentOfTracks = percentOfTracks;
}

private Integer albumCount;
private Integer trackFileCount;
private Integer trackCount;
private Integer totalTrackCount;
private Integer sizeOnDisk;
private Double percentOfTracks;
private Integer albumCount = 0;
private Integer trackFileCount = 0;
private Integer trackCount = 0;
private Integer totalTrackCount = 0;
private Integer sizeOnDisk = 0;
private Double percentOfTracks = 0.0;
}
2 changes: 2 additions & 0 deletions src/main/java/com/botdarr/clients/ChatClientBootstrap.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ protected <T extends ChatClientResponse> void runAndProcessCommands(String prefi
chatSender.send(clientResponse);
}
}
} catch (Throwable throwable) {
LOGGER.error("Error caught processing command", throwable);
} finally {
CommandContext.end();
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.6.14
5.6.15

0 comments on commit 2404a25

Please sign in to comment.