mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-10 07:18:47 +00:00
Snap to Radarr's native filter logic
This commit is contained in:
parent
1286466669
commit
f022315d11
3 changed files with 5 additions and 1 deletions
|
@ -20,6 +20,7 @@ export default function Component({ service }) {
|
|||
return (
|
||||
<Container service={service}>
|
||||
<Block label="radarr.wanted" />
|
||||
<Block label="radarr.missing" />
|
||||
<Block label="radarr.queued" />
|
||||
<Block label="radarr.movies" />
|
||||
</Container>
|
||||
|
@ -29,6 +30,7 @@ export default function Component({ service }) {
|
|||
return (
|
||||
<Container service={service}>
|
||||
<Block label="radarr.wanted" value={moviesData.wanted} />
|
||||
<Block label="radarr.missing" value={moviesData.missing} />
|
||||
<Block label="radarr.queued" value={queuedData.totalCount} />
|
||||
<Block label="radarr.movies" value={moviesData.all} />
|
||||
</Container>
|
||||
|
|
|
@ -10,7 +10,8 @@ const widget = {
|
|||
endpoint: "movie",
|
||||
map: (data) => ({
|
||||
wanted: jsonArrayFilter(data, (item) => item.monitored && !item.hasFile && item.isAvailable).length,
|
||||
all: jsonArrayFilter(data, (item) => item.isAvailable).length,
|
||||
have: jsonArrayFilter(data, (item) => item.hasFile).length,
|
||||
missing: jsonArrayFilter(data, (item) => item.monitored && !item.hasFile).length,
|
||||
}),
|
||||
},
|
||||
"queue/status": {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue