aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--docs/customservices.md4
-rw-r--r--src/components/services/Radarr.vue15
-rw-r--r--src/components/services/Sonarr.vue14
3 files changed, 25 insertions, 8 deletions
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
84```yaml 84```yaml
85- name: "Radarr" 85- name: "Radarr"
86 type: "Radarr" 86 type: "Radarr"
87 url: "http://localhost:8989/" 87 url: "http://localhost:7878/"
88 apikey: "MY-SUPER-SECRET-API-KEY" 88 apikey: "MY-SUPER-SECRET-API-KEY"
89 target: "_blank" # optional html tag target attribute 89 target: "_blank"
90 legacyApi: true 90 legacyApi: true
91``` 91```
92 92
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 {
75 this.fetch(`${this.apiPath}/queue?apikey=${this.item.apikey}`) 75 this.fetch(`${this.apiPath}/queue?apikey=${this.item.apikey}`)
76 .then((queue) => { 76 .then((queue) => {
77 this.activity = 0; 77 this.activity = 0;
78 for (var i = 0; i < queue.length; i++) { 78
79 if (queue[i].movie) { 79 if (this.item.legacyApi) {
80 this.activity++; 80 for (var i = 0; i < queue.length; i++) {
81 if (queue[i].series) {
82 this.activity++;
83 }
84 }
85 } else {
86 for (const record of queue.records) {
87 if (record.movieId) {
88 this.activity++;
89 }
81 } 90 }
82 } 91 }
83 }) 92 })
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 {
76 this.fetch(`${this.apiPath}/queue?apikey=${this.item.apikey}`) 76 this.fetch(`${this.apiPath}/queue?apikey=${this.item.apikey}`)
77 .then((queue) => { 77 .then((queue) => {
78 this.activity = 0; 78 this.activity = 0;
79 for (var i = 0; i < queue.length; i++) { 79 if (this.item.legacyApi) {
80 if (queue[i].series) { 80 for (var i = 0; i < queue.length; i++) {
81 this.activity++; 81 if (queue[i].series) {
82 this.activity++;
83 }
84 }
85 } else {
86 for (const record of queue.records) {
87 if (record.seriesId) {
88 this.activity++;
89 }
82 } 90 }
83 } 91 }
84 }) 92 })