Skip to content

Commit

Permalink
Add legacy API check to new radarr functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Dyckhoff committed Nov 1, 2024
1 parent 6ad2dd0 commit 09ec5c5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# build stage
FROM --platform=$BUILDPLATFORM node:22-alpine3.20 AS build-stage
FROM node:22-alpine3.20 AS build-stage

ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
Expand Down
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 09ec5c5

Please sign in to comment.