diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 7fcb402..01851a0 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -3,8 +3,7 @@ on: pull_request_target: types: [opened, synchronize, reopened] branches: - - '**' - - '!development' + - 'development' push: branches: - '**' diff --git a/src/main/java/com/botdarr/api/lidarr/LidarrApi.java b/src/main/java/com/botdarr/api/lidarr/LidarrApi.java index 1b22f1c..67d018a 100644 --- a/src/main/java/com/botdarr/api/lidarr/LidarrApi.java +++ b/src/main/java/com/botdarr/api/lidarr/LidarrApi.java @@ -16,6 +16,7 @@ import org.apache.http.impl.client.HttpClientBuilder; import org.apache.logging.log4j.LogManager; +import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; @@ -235,7 +236,7 @@ public List onSuccess(String response) { private CommandResponse addArtist(LidarrArtist lidarrArtist) { lidarrArtist.setMonitored(true); - lidarrArtist.setRootFolderPath(Config.getProperty(Config.Constants.LIDARR_PATH) + "/"); + lidarrArtist.setRootFolderPath(Config.getProperty(Config.Constants.LIDARR_PATH) + File.separator); String lidarrProfileName = Config.getProperty(Config.Constants.LIDARR_DEFAULT_QUALITY_PROFILE); LidarrQualityProfile lidarrQualityProfile = LIDARR_CACHE.getQualityProfile(lidarrProfileName.toLowerCase()); diff --git a/src/main/java/com/botdarr/api/sonarr/SonarrApi.java b/src/main/java/com/botdarr/api/sonarr/SonarrApi.java index 241344d..5e76c59 100644 --- a/src/main/java/com/botdarr/api/sonarr/SonarrApi.java +++ b/src/main/java/com/botdarr/api/sonarr/SonarrApi.java @@ -12,6 +12,7 @@ import org.apache.http.impl.client.HttpClientBuilder; import org.apache.logging.log4j.LogManager; +import java.io.File; import java.io.IOException; import java.util.*; @@ -302,7 +303,7 @@ public List onSuccess(String response) { private CommandResponse addShow(SonarrShow sonarrShow) { String title = sonarrShow.getTitle(); //make sure we specify where the show should get downloaded - sonarrShow.setPath(Config.getProperty(Config.Constants.SONARR_PATH) + "/" + title); + sonarrShow.setPath(Config.getProperty(Config.Constants.SONARR_PATH) + File.separator + title); //make sure the show is monitored sonarrShow.setMonitored(true); //make sure to have seasons stored in separate folders @@ -325,8 +326,7 @@ private CommandResponse addShow(SonarrShow sonarrShow) { String json = new GsonBuilder().addSerializationExclusionStrategy(excludeUnnecessaryFields).create().toJson(sonarrShow, SonarrShow.class); HttpRequestBase post = new SonarrUrls.SonarrRequestBuilder().buildPost(SonarrUrls.SERIES_BASE, json).build(); - //TODO: why isn't the content type json - post.addHeader("content-type", "application/x-www-form-urlencoded"); + post.addHeader("content-type", "application/json"); try (CloseableHttpResponse response = client.execute(post)) { int statusCode = response.getStatusLine().getStatusCode(); diff --git a/src/main/resources/version.txt b/src/main/resources/version.txt index 7ba0f8a..51d29ed 100644 --- a/src/main/resources/version.txt +++ b/src/main/resources/version.txt @@ -1 +1 @@ -5.6.7 \ No newline at end of file +5.6.8 \ No newline at end of file