-
-
Notifications
You must be signed in to change notification settings - Fork 407
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
feat: simple failed request handling #474
Conversation
I just thought of one more thing. If someone deletes all requests associated with any media, we keep the media but set its status back to Unknown. That would mark it as failed, but it isn't. |
So the idea is that, if all requests are deleted with any media, it wouldn't matter if a request connected to it would be marked as failed, since there's no request to actually see as failed. However, when there are requests and the media is still unknown, that signifies it's failed since that shouldn't be a possible state when the media is in Radarr/Sonarr or available. |
Ah yeah true. Since there are no requests it won't show up in the request list so it doesn't really matter. |
7fc48ee
to
5b545ea
Compare
One thing I didn't consider about setting to Pending and then back to Approved are the notifications there... might be better just to include a small refactor for a dedicated endpoint. |
The dedicated endpoint would just try to send the media back to radarr/sonarr again, yes? Because if we touch the statuses on the request it will still refire the listeners and trigger notifications. |
6b91242
to
b0208ed
Compare
Yeah, so I added a
This is the same as the normal AfterUpdate hooks, with the exception of not sending notifications. Let me know if I should make this endpoint dedicated for retry instead, I figured it might be something that comes with more uses in the future, but you might prefer many overloads rather than a single endpoint. |
I think having its own endpoint is better. Right now you are setting an action in an endpoint that is supposed to accept a status. Even if its an overload, the docs will be clearer in that regard. |
b0208ed
to
f6d7da5
Compare
f6d7da5
to
1a0e6ad
Compare
src/components/StatusBadge/index.tsx
Outdated
case MediaStatus.UNKNOWN: | ||
return ( | ||
<Badge badgeType="danger"> | ||
{intl.formatMessage(globalMessages.failed)} | ||
</Badge> | ||
); |
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.
This will cause the failed status badge to show up in many place throughout the app, not just the RequestList.
RequestCard uses this. So does the movie/tv details pages now.
|
||
const messages = defineMessages({ | ||
requestedby: 'Requested by {username}', | ||
seasons: 'Seasons', | ||
notavailable: 'N/A', | ||
failedretry: 'Something went wrong retrying that request', |
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.
failedretry: 'Something went wrong retrying that request', | |
failedretry: 'Something went wrong retrying the request', |
When a movie or series is added with radarr or sonarr, if it fails, this changes the media state to unknown and sends a notification to admins. Client side this will look like a failed state along with a retry button that will delete the request and re-queue it.
1a0e6ad
to
38dd491
Compare
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.
LGTM!
🎉 This PR is included in version 1.14.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Description
When a movie or series is added with radarr or sonarr, if it fails, this changes the media state to unknown and sends a notification to admins.
Client side this will look like a failed state along with a retry button, which when clicked will delete the request and re-add it.
Screenshot (if UI related)
Todos
yarn build
yarn i18n:extract
Issues Fixed or Closed by this PR