Merge pull request #418 from JazzFisch/fix-397

Fix incorrect wanted value in Radarr widget and add the "Missing" field.
pull/415/head
Jason Fischer 2 years ago committed by GitHub
commit 74de07a22a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -105,6 +105,7 @@
}, },
"radarr": { "radarr": {
"wanted": "Wanted", "wanted": "Wanted",
"missing": "Missing",
"queued": "Queued", "queued": "Queued",
"movies": "Movies" "movies": "Movies"
}, },

@ -20,6 +20,7 @@ export default function Component({ service }) {
return ( return (
<Container service={service}> <Container service={service}>
<Block label="radarr.wanted" /> <Block label="radarr.wanted" />
<Block label="radarr.missing" />
<Block label="radarr.queued" /> <Block label="radarr.queued" />
<Block label="radarr.movies" /> <Block label="radarr.movies" />
</Container> </Container>
@ -29,6 +30,7 @@ export default function Component({ service }) {
return ( return (
<Container service={service}> <Container service={service}>
<Block label="radarr.wanted" value={moviesData.wanted} /> <Block label="radarr.wanted" value={moviesData.wanted} />
<Block label="radarr.missing" value={moviesData.missing} />
<Block label="radarr.queued" value={queuedData.totalCount} /> <Block label="radarr.queued" value={queuedData.totalCount} />
<Block label="radarr.movies" value={moviesData.have} /> <Block label="radarr.movies" value={moviesData.have} />
</Container> </Container>

@ -9,8 +9,9 @@ const widget = {
movie: { movie: {
endpoint: "movie", endpoint: "movie",
map: (data) => ({ map: (data) => ({
wanted: jsonArrayFilter(data, (item) => item.isAvailable === false).length, wanted: jsonArrayFilter(data, (item) => item.monitored && !item.hasFile && item.isAvailable).length,
have: jsonArrayFilter(data, (item) => item.isAvailable === true).length, have: jsonArrayFilter(data, (item) => item.hasFile).length,
missing: jsonArrayFilter(data, (item) => item.monitored && !item.hasFile).length,
}), }),
}, },
"queue/status": { "queue/status": {

Loading…
Cancel
Save