Add Sonarr refactor

This commit is contained in:
Jason Fischer 2022-09-25 10:13:31 -07:00
parent 5cfadaea7f
commit f999f4a467
No known key found for this signature in database
4 changed files with 65 additions and 0 deletions

View 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;