Skip to content

Commit

Permalink
Add check for legacy API around new functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Dyckhoff committed Nov 1, 2024
1 parent a63a32a commit 5998b1e
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/components/services/Radarr.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,19 @@ export default {
}
})
.catch(handleError);
this.fetch(`${this.apiPath}/queue/details?apikey=${this.item.apikey}`)
.then((queue) => {
for (var i = 0; i < queue.length; i++) {
if (queue[i].trackedDownloadStatus == "warning") {
this.warnings++;
} else if (queue[i].trackedDownloadStaus == "error") {
this.errors++;
if (!this.item.legacyApi) {
this.fetch(`${this.apiPath}/queue/details?apikey=${this.item.apikey}`)
.then((queue) => {
for (var i = 0; i < queue.length; i++) {
if (queue[i].trackedDownloadStatus == "warning") {
this.warnings++;
} else if (queue[i].trackedDownloadStaus == "error") {
this.errors++;
}
}
}
})
.catch(handleError);
})
.catch(handleError);
}
this.fetch(`${this.apiPath}/queue?apikey=${this.item.apikey}`)
.then((queue) => {
this.activity = 0;
Expand Down

0 comments on commit 5998b1e

Please sign in to comment.