-
-
Notifications
You must be signed in to change notification settings - Fork 807
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve warning and missing reports for Radarr connections #809
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution @Bothari, a few question but it looks fine 👍
src/components/services/Radarr.vue
Outdated
).length; | ||
this.fetch(`${this.apiPath}/wanted/missing?pageSize=1&apikey=${this.item.apikey}`) | ||
.then((overview) => { | ||
this.fetch(`${this.apiPath}/wanted/missing?pageSize=${overview.totalRecords}&apikey=${this.item.apikey}`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a fan of the double request to avoid handling the pagination but it doesn't seems to have any limit on the pageSize, so I guess it should be fine!
Indentation looks funny, could you rebase your PR to get the latest changes and run pnpm lint
? Thanks 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I don't love the double request method, but it seemed like it would be more responsive that handling the pagination. Do you have a policy of respecting pagination in other parts of the codebase? If so then I am happy to update it to do so.
I think I've fixed the indentation (I was using tabs instead of spaces!) but full disclosure, this is the first time I've ever done a PR on GitHub. 20+ years experience as a software engineer but I've never done a PR in Git.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no specific policy regarding pagination, let keep it like that, implementing the proper pagination would be overkill.
Congrats on your first PR @Bothari 🎉! And thanks A LOT for contributing to open source. It's really appreciated, especially for Homer, I can't test and maintain all the custom cards myself because I don't use all the services (this is a good example, I don't use Radarr!).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I also just committed some bad code and managed to revert it. 😂
I think Homer is a fantastic tool BTW, so congratulations on it. Really simple to use and extend. Love it.
src/components/services/Radarr.vue
Outdated
@@ -77,6 +77,17 @@ export default { | |||
} | |||
}) | |||
.catch(handleError); | |||
this.fetch(`${this.apiPath}/queue/details?apikey=${this.item.apikey}`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to be sure, is the /queue/details
endpoint exists on the old API ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've no idea where to find documentation on the old API. Should I just wrap this new section in if (!this.item.legacyApi)
in case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find it either :(
I don't even know if the legacy API is used anymore. Let's put the if
as you suggest for now if that's ok for you 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have done this! Cheers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your work @Bothari !
Hell yes! Thank you! |
Description
Radarr uses a different method of reporting "missing" content, which tracks the availability of the items. Before this change, the Radarr service would display "missing" count for movies which are years away from release. With this change, it will now only display "missing" count for movies which have been released and should be available per the user settings defined in Radarr.
I also improved the "warning" handling to include queue warnings and errors. For example if a movie download has stalled for some reason, it will show the warning.
Fixes #638, "Add Wanted count to Arrs"
#638
Type of change
Checklist:
config.yml
file