diff --git a/docs/customservices.md b/docs/customservices.md index 91c4051..9317907 100644 --- a/docs/customservices.md +++ b/docs/customservices.md @@ -84,9 +84,9 @@ If you are using an older version of Radarr or Sonarr which don't support the ne ```yaml - name: "Radarr" type: "Radarr" - url: "http://localhost:8989/" + url: "http://localhost:7878/" apikey: "MY-SUPER-SECRET-API-KEY" - target: "_blank" # optional html tag target attribute + target: "_blank" legacyApi: true ``` diff --git a/src/components/services/Radarr.vue b/src/components/services/Radarr.vue index 13f6d68..55896f5 100644 --- a/src/components/services/Radarr.vue +++ b/src/components/services/Radarr.vue @@ -75,9 +75,18 @@ export default { this.fetch(`${this.apiPath}/queue?apikey=${this.item.apikey}`) .then((queue) => { this.activity = 0; - for (var i = 0; i < queue.length; i++) { - if (queue[i].movie) { - this.activity++; + + if (this.item.legacyApi) { + for (var i = 0; i < queue.length; i++) { + if (queue[i].series) { + this.activity++; + } + } + } else { + for (const record of queue.records) { + if (record.movieId) { + this.activity++; + } } } }) diff --git a/src/components/services/Sonarr.vue b/src/components/services/Sonarr.vue index 3e5c49f..55df437 100644 --- a/src/components/services/Sonarr.vue +++ b/src/components/services/Sonarr.vue @@ -76,9 +76,17 @@ export default { this.fetch(`${this.apiPath}/queue?apikey=${this.item.apikey}`) .then((queue) => { this.activity = 0; - for (var i = 0; i < queue.length; i++) { - if (queue[i].series) { - this.activity++; + if (this.item.legacyApi) { + for (var i = 0; i < queue.length; i++) { + if (queue[i].series) { + this.activity++; + } + } + } else { + for (const record of queue.records) { + if (record.seriesId) { + this.activity++; + } } } })