mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-12 16:08:48 +00:00
Add Sonarr refactor
This commit is contained in:
parent
5cfadaea7f
commit
f999f4a467
4 changed files with 65 additions and 0 deletions
24
src/widgets/sonarr/widget.js
Normal file
24
src/widgets/sonarr/widget.js
Normal file
|
@ -0,0 +1,24 @@
|
|||
import genericProxyHandler from "utils/proxies/generic";
|
||||
import { asJson } from "utils/api-helpers";
|
||||
|
||||
const widget = {
|
||||
api: "{url}/api/v3/{endpoint}?apikey={key}",
|
||||
proxyHandler: genericProxyHandler,
|
||||
|
||||
mappings: {
|
||||
"series": {
|
||||
endpoint: "series",
|
||||
map: (data) => ({
|
||||
total: asJson(data).length,
|
||||
}),
|
||||
},
|
||||
"queue": {
|
||||
endpoint: "queue",
|
||||
},
|
||||
"wanted/missing": {
|
||||
endpoint: "wanted/missing",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default widget;
|
Loading…
Add table
Add a link
Reference in a new issue