Skip to content

Media Browser: Use Media Class#6904

Merged
zsarnett merged 17 commits intodevfrom
use-class-media-broser
Sep 12, 2020
Merged

Media Browser: Use Media Class#6904
zsarnett merged 17 commits intodevfrom
use-class-media-broser

Conversation

@zsarnett
Copy link
Copy Markdown
Contributor

@zsarnett zsarnett commented Sep 10, 2020

Proposed change

67945970b31ab8d399f69f63314e6b44

201856da38b59667e2cc9feca7f22fae

Type of change

  • New feature (thank you!)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

})}"
>
${currentItem.children.map(
(child) => html`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(child) => html`
(child) => { const classStyles = MediaClassBrowserSettings[child.media_class]; return html`

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what you are going for here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are no per child classes needed

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You keep looking up the MediaClassBrowserSettings, do it once and store in a var.

@zsarnett
Copy link
Copy Markdown
Contributor Author

Need to fix safari rendering in this PR as well

@zsarnett zsarnett marked this pull request as ready for review September 12, 2020 01:07
@zsarnett
Copy link
Copy Markdown
Contributor Author

Also I should fix this #6946

@zsarnett
Copy link
Copy Markdown
Contributor Author

Going to fix this too #6949 EZ fix

@zsarnett
Copy link
Copy Markdown
Contributor Author

@bramkragten I cant figure out the damn safari bug right now. Also, its late and Friday. and beers so

Comment thread src/components/media-player/ha-media-player-browse.ts Outdated
Comment thread src/components/media-player/ha-media-player-browse.ts Outdated
Comment thread src/components/media-player/ha-media-player-browse.ts Outdated
@zsarnett zsarnett merged commit 8b490c5 into dev Sep 12, 2020
@zsarnett zsarnett deleted the use-class-media-broser branch September 12, 2020 16:59
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants