mirror of
https://github.com/bastienwirtz/homer.git
synced 2025-03-13 06:49:32 +01:00
Improve warning and missing reports for Radarr connections (#809)
Improve warning and missing reports for Radarr connections
This commit is contained in:
parent
779deedecd
commit
1febbadfba
@ -77,6 +77,19 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(handleError);
|
.catch(handleError);
|
||||||
|
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);
|
||||||
|
}
|
||||||
this.fetch(`${this.apiPath}/queue?apikey=${this.item.apikey}`)
|
this.fetch(`${this.apiPath}/queue?apikey=${this.item.apikey}`)
|
||||||
.then((queue) => {
|
.then((queue) => {
|
||||||
this.activity = 0;
|
this.activity = 0;
|
||||||
@ -93,12 +106,15 @@ export default {
|
|||||||
})
|
})
|
||||||
.catch(handleError);
|
.catch(handleError);
|
||||||
if (!this.item.legacyApi) {
|
if (!this.item.legacyApi) {
|
||||||
this.fetch(`${this.apiPath}/movie?apikey=${this.item.apikey}`)
|
this.fetch(`${this.apiPath}/wanted/missing?pageSize=1&apikey=${this.item.apikey}`)
|
||||||
|
.then((overview) => {
|
||||||
|
this.fetch(`${this.apiPath}/wanted/missing?pageSize=${overview.totalRecords}&apikey=${this.item.apikey}`)
|
||||||
.then((movies) => {
|
.then((movies) => {
|
||||||
this.missing = movies.filter(
|
this.missing = movies.records.filter(
|
||||||
(m) => m.monitored && !m.hasFile
|
(m) => m.monitored && m.isAvailable && !m.hasFile
|
||||||
).length;
|
).length;
|
||||||
})
|
})
|
||||||
|
})
|
||||||
.catch(handleError);
|
.catch(handleError);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user