X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2Fcomponents%2Fservices%2FSonarr.vue;h=bb83b6b00a485055f747d934d51ef72b2ab94756;hb=5cd802d157a687224949a0f0cc9f93413aefaaf2;hp=3e5c49fb938459e15e60deddcacbfc760bda3777;hpb=8ede30411ed1726ed3885fd617364924e677abc2;p=github%2Fbastienwirtz%2Fhomer.git diff --git a/src/components/services/Sonarr.vue b/src/components/services/Sonarr.vue index 3e5c49f..bb83b6b 100644 --- a/src/components/services/Sonarr.vue +++ b/src/components/services/Sonarr.vue @@ -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) => {