Skip to content

Commit

Permalink
Fix automatic configuration of Sonarr v3. Closes #753
Browse files Browse the repository at this point in the history
  • Loading branch information
theotherp committed Jan 30, 2022
1 parent 9408848 commit e015cfd
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,8 @@ private void executeConfigurationRequest(AddRequest addRequest, BackendType back
if (externalTool == AddRequest.ExternalTool.Sonarrv3) {
//V3 requires an empty list if no categories are supplied
xdarrAddRequest.getFields().add(new XdarrAddRequestField("animeCategories", addRequest.getAnimeCategories() == null ? Collections.emptyList() : addRequest.getAnimeCategories()));
xdarrAddRequest.setDownloadClientId(0);
xdarrAddRequest.getFields().add(new XdarrAddRequestField("animeStandardFormatSearch", false));
} else if (externalTool != AddRequest.ExternalTool.Lidarr && externalTool != AddRequest.ExternalTool.Radarrv3) {
new XdarrAddRequestField("animeCategories", mapCategories(addRequest.getCategories(), addRequest));
}
Expand Down Expand Up @@ -478,6 +480,7 @@ private Map<String, String> parseParameters(String parametersString) {
@JsonIgnoreProperties(ignoreUnknown = true)
public static class XdarrIndexer {

public int downloadClientId = 0;
public Boolean enableRss;
public Boolean enableAutomaticSearch;
public Boolean enableInteractiveSearch;
Expand Down
133 changes: 81 additions & 52 deletions core/src/main/resources/changelog.json
Original file line number Diff line number Diff line change
@@ -1,54 +1,83 @@
[ {
"version" : "v4.0.1",
"date" : "2022-01-10",
"changes" : [ {
"type" : "fix",
"text" : "Properly read X-Forwarded-For header and original IP."
}, {
"type" : "fix",
"text" : "Execute connection check after an indexer's API key has changed."
} ],
"final" : true
}, {
"version" : "v4.0.0",
"date" : "2022-01-02",
"changes" : [ {
"type" : "feature",
"text" : "Update framework libraries and add support for Java 17."
}, {
"type" : "feature",
"text" : "NZBHydra now (hopefully) properly supports indexers that return more than 100 results per API page. When I started developing 8 years ago no indexer I knew of returned more than 100 results, now some return 500 or even 1000. That obviously often tremendously reduces the API hits needed to fill a page or find a certain result. NZBHydra will now request 1000 results (many indexers will still only return 100) per page. The page size of the results returned by NZBHydra is still 100 (if not overwritten in the API request). The amount of API hits made by local programs doesn't matter and the time and performance overhead are negligible. Please note that these changes required some hefty changes in the deeps of the search logic and may have produced some bugs. Let me know if it works as expected."
}, {
"type" : "feature",
"text" : "Show assigned colors of indexers in config list."
}, {
"type" : "note",
"text" : "Happy new year!"
} ],
"final" : true
}, {
"version" : "v3.18.4",
"date" : "2021-12-11",
"changes" : [ {
"type" : "fix",
"text" : "Update logging library to a newer version due to a security issue. This isn't much of an issue, in my opinion, as I use a different library although this one is used by others. It also only affects JDKs that are older than a year and it's not an issue on docker containers."
} ],
"final" : true
}, {
"version" : "v3.18.3",
"date" : "2021-12-06",
"changes" : [ {
"type" : "fix",
"text" : "Added nzbgeek to the list of indexers which don't support movie/tvsearch searches without IDs."
} ],
"final" : true
}, {
"version" : "v3.18.2",
"date" : "2021-12-06",
"changes" : [ {
"type" : "fix",
"text" : "Some indexers do not support movie/tvsearch type queries without IDs but with word based queries (I know of nzbplanet and dognzb). For these indexers the search type is automatically switched to search when no IDs but a word query is given."
} ],
[
{
"version": "v4.0.2",
"changes": [
{
"type": "fix",
"text": "Fix automatic configuration of Sonarr v3. See #753"
}
],
"final": true
},
{
"version": "v4.0.1",
"date": "2022-01-10",
"changes": [
{
"type": "fix",
"text": "Properly read X-Forwarded-For header and original IP."
},
{
"type": "fix",
"text": "Execute connection check after an indexer's API key has changed."
}
],
"final": true
},
{
"version": "v4.0.0",
"date": "2022-01-02",
"changes": [
{
"type": "feature",
"text": "Update framework libraries and add support for Java 17."
},
{
"type": "feature",
"text": "NZBHydra now (hopefully) properly supports indexers that return more than 100 results per API page. When I started developing 8 years ago no indexer I knew of returned more than 100 results, now some return 500 or even 1000. That obviously often tremendously reduces the API hits needed to fill a page or find a certain result. NZBHydra will now request 1000 results (many indexers will still only return 100) per page. The page size of the results returned by NZBHydra is still 100 (if not overwritten in the API request). The amount of API hits made by local programs doesn't matter and the time and performance overhead are negligible. Please note that these changes required some hefty changes in the deeps of the search logic and may have produced some bugs. Let me know if it works as expected."
},
{
"type": "feature",
"text": "Show assigned colors of indexers in config list."
},
{
"type": "note",
"text": "Happy new year!"
}
],
"final": true
},
{
"version": "v3.18.4",
"date": "2021-12-11",
"changes": [
{
"type": "fix",
"text": "Update logging library to a newer version due to a security issue. This isn't much of an issue, in my opinion, as I use a different library although this one is used by others. It also only affects JDKs that are older than a year and it's not an issue on docker containers."
}
],
"final": true
},
{
"version": "v3.18.3",
"date": "2021-12-06",
"changes": [
{
"type": "fix",
"text": "Added nzbgeek to the list of indexers which don't support movie/tvsearch searches without IDs."
}
],
"final": true
},
{
"version": "v3.18.2",
"date": "2021-12-06",
"changes": [
{
"type": "fix",
"text": "Some indexers do not support movie/tvsearch type queries without IDs but with word based queries (I know of nzbplanet and dognzb). For these indexers the search type is automatically switched to search when no IDs but a word query is given."
}
],
"final" : true
}, {
"version" : "v3.18.1",
Expand Down Expand Up @@ -3412,4 +3441,4 @@
"text" : "First public release. Welcome!"
} ],
"final" : true
} ]
} ]

0 comments on commit e015cfd

Please sign in to comment.