Skip to content

Commit

Permalink
Check for null episode overviews (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
shayaantx authored Oct 1, 2023
1 parent f652a84 commit ab7b342
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ on:
types: [opened, synchronize, reopened]
branches:
- 'development'
push:
branches:
- '**'
- '!development'
jobs:
test:
runs-on: ubuntu-latest
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/botdarr/api/sonarr/SonarrApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.util.Strings;

import java.io.File;
import java.io.IOException;
Expand Down Expand Up @@ -248,7 +249,7 @@ private ShowDownloadResponse getDownloadBasedApiQueue(SonarrQueue showQueue) {
statusMessages.add(sonarrQueueStatusMessages.getTitle());
}
String overview = episode.getOverview();
if (overview.length() > VALUE_MAX_LENGTH) {
if (!Strings.isEmpty(overview) && overview.length() > VALUE_MAX_LENGTH) {
overview = overview.substring(0, VALUE_MAX_LENGTH);
}
return new ShowDownloadResponse(new SonarrDownloadActivity(
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.9
5.6.10

0 comments on commit ab7b342

Please sign in to comment.