]> git.immae.eu Git - github/bastienwirtz/homer.git/blobdiff - src/components/services/Sonarr.vue
Merge pull request #380 from FinalDoom/main
[github/bastienwirtz/homer.git] / src / components / services / Sonarr.vue
index 3e5c49fb938459e15e60deddcacbfc760bda3777..bb83b6b00a485055f747d934d51ef72b2ab94756 100644 (file)
@@ -76,10 +76,14 @@ 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 {
+            this.activity = queue.totalRecords;
           }
         })
         .catch((e) => {