-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Handle media browser errors #6813
Conversation
@@ -92,11 +94,54 @@ export class HaMediaPlayerBrowse extends LitElement { | |||
this._navigate(item); | |||
} | |||
|
|||
private _renderError(err: { message: string; code: string }) { | |||
if (err.message === "Path does not exist.") { |
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.
After a backend change this should be:
if (err.message === "Path does not exist.") { | |
if (err.code === "no_media_folder") { |
Co-authored-by: Joakim Sørensen <joasoe@gmail.com>
<p> | ||
Check the | ||
<a | ||
href="https://www.home-assistant.io/integrations/media_source/#local-media" |
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.
Should we use the RC site if the version contains a "b" here?
This will go to a non-exsisting site during the beta
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.
If we do that, we should get a helper method and apply that everywhere. I think it's fine for now.
Proposed change
Handle media browsers better, so it doesn't break the UI and we explain the user how he can make it work.
Needs home-assistant/core#39759
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: