Repository navigation
Conversation
Lets users add *arr-like apps that are not built in (for example Chaptarr) with their own API version, optional OpenAPI URL and icon, and proxy them like the built-in starr apps. Queries use bound parameters, icons are checked by image content (PNG, JPEG, WebP), URLs must be http(s) and app names cannot shadow built-in apps or pages.
|
Thanks for taking the time to build it out. The current workflow: You can already have local templates and assign those and build those out. The idea is when adding a new app that would be used and once the endpoints are sorted out for required permissions, PR the template and then anyone can use it as it would be part of the app. Edit: Feel free to join the discord server, there is a #starrproxy channel there and we can discuss things a little faster as well. Just ping me if you do. |
|
Sorry, i responded to this before looking further into what you where doing. My brain registered as something other than adding more top level app support. Let me think on this as ideally it would be better to do this in a way that benefits everyone and every user doesnt have to create custom app support. Might require a little UI changing but possibly a group of the "parent" starr apps (current ones) and then a group of "children" apps. they would be added internally like the parent apps with their own ids and what not and can start at 100 like you did. to avoid cluttering the header we would need to think on a UI change to handle it. maybe a different flow for adding external apps that has a different screen where you pick the starr (parent or child) and link it up that way. then the header just shows what you have proxied.. |
No worries, and thanks for taking a closer look. That approach sounds better to me too: built-in child apps mean everyone gets support without setting anything up, and showing only proxied apps in the header solves the clutter problem. Much of this PR could carry over: the ID offset at 100, fetching and caching the OpenAPI spec, the icon handling, and the per-app nav setting. Though i think an approach that everyone can benefit from would need a central storage for people to contribute more easily, and not through manual github PRs, or what did you have in mind here? Once you've decided how you want the UI and the add flow to look, let me know and I'll try to rework it in that direction. |
|
My initial thought is a blank header with an [+ Add app] button kind of thing, that opens a simple dialig with the starr information (the fields in the table basically) and then it becomes a header icon for that app. from there the current process kids in with the tabs and adding 3rd party apps. For sure a lot of the logic you already had carries over so that will save some time I'll think on a better way to get user edits from the app to github vs manually creating PRs.. maybe a way to pipe it through the notifiarr API which allows the bot to then automatically create GH stuff (this can come later) |
Problem
Only the six built-in starr apps can be proxied. Forks and newer *arr-style apps (Chaptarr and similar) speak the same API but cannot be added.
Change
StarrApps::CUSTOM_ID_OFFSET) so they never collide with built-in IDs;getAllAppsList(),getStarrInterfaceIdFromName()and friends include them./api/{version}/system/status, sinceconfig/hostis not guaranteed outside the core apps.009_custom_appsadds thecustom_appstable.data-nav-setting), and the access form shows an error toast when it fails to load.Hardening in this feature:
<name>.<detected ext>. No SVG.^[a-z][a-z0-9]{1,31}$, cannot be a built-in app or a page name (?app=is routed before?page=).16 files, about 600 lines. Happy to split or change anything if you would like it shaped differently.
Testing
Built from this branch with an existing database (migration 007 to 009 ran).
Bad Name/settings/radarr3, OpenAPI URLfile:///etc/passwdTe'st"); DROP TABLE settings;--image/png