usernein / tv-card

📺 TV Remote Card (with touchpad and haptic feedback)
Apache License 2.0
109 stars 28 forks source link

Unable to add new apps to apps-row #4

Closed brewston closed 2 years ago

brewston commented 2 years ago

Checklist:

Release with the issue:

Last working release (if known):

Browser and Operating System:

Description of problem:

I have a Samsung TV and use https://github.com/ollo69/ha-samsungtv-smart

I tried adding some other apps like plex, disney+, prime onto my remote card and they don't show up. I know that the samsungtv-smart recognises them as I have configured in a custom:mini-media-player card:

Example YAML from my card :

apps_row:
  - prime
  - netflix
  - youtube
  - spotify
  - plex

Javascript errors shown in the web inspector (if applicable):

Additional information: Thanks for developing this, it looks great.

usernein commented 2 years ago

Hello! Good to hear you use that integration, it makes the following steps much easier

You need to define custom buttons for adding other apps than Netflix, Spotify and YouTube (these are available because i defined them on the code)

Check this comment on other issue with the almost the same question (it's about HBO but applies to any other apps, you'll just need to get the app_id for them)

brewston commented 2 years ago

Thanks, that worked for plex, prime & disney+ - I needed to open the .svg file in a text editor to extract the string to paste into the yaml. But simpleicons doesn't have disney+ - I tried repeating the same process with .svg files from other source but it never renders . I will keep trying. Thanks.

usernein commented 2 years ago

Hey @brewston! Check out v0.5.0 It lets you use other icon packs than MDI.

Now you can include those icons without touching svg paths, using the simpleicons integration:

custom_sources:
  plex:
    icon: si:plex
    source: Plex
  prime:
    icon: si:primevideo
    source: Prime Video
usernein commented 2 years ago

But simpleicons doesn't have disney+ - I tried repeating the same process with .svg files from other source but it never renders .

I also use Disney+ and i had the same issue. I don't have experience with SVG so i have no clue on why it doesn't renders

But i found this and this, saying that SimpleIcons (and probably any other pack) won't have Disney-related icons

brewston commented 2 years ago

I figured it out, you can use this :

disney-plus: >-
    M1.656,6.367c-0.482,0 -1.052,-0.065 -1.052,-0.35c0,-2.016 3.549,-2.103
    5.061,-2.103c1.971,-0 4.49,0.613 6.637,1.38c3.264,1.183 9.88,5.126
    9.88,9.639c-0,3.986 -4.294,5.892 -8.281,5.892c-1.072,-0.032 -2.141,-0.142
    -3.198,-0.328c-0.066,0.241 -0.109,0.416 -0.263,0.92c-0.252,0.052
    -0.509,0.081 -0.767,0.087l-0.503,-0.043c-0.329,-0.395 -0.438,-1.03
    -0.57,-1.709c-1.993,-1.161 -3.286,-2.147 -3.877,-2.826c-0.504,-0.526
    -1.074,-1.227 -1.074,-1.906c0,-0.35 0.219,-0.657 0.723,-1.007c1.03,-0.767
    2.344,-1.183 4.491,-1.556l0.044,-0.898c0.022,-0.219 0.241,-2.563
    0.745,-3.001c0.81,0.657 0.898,1.336 0.963,2.344c0.022,0.438 0.044,0.898
    0.11,1.38l0.307,-0c1.533,-0 6.221,0.394 6.221,2.607c-0,0.526 -0.767,1.511
    -1.512,1.511c-0.341,-0.006 -0.674,-0.105 -0.963,-0.284c0.328,-0.373
    0.81,-0.701 0.942,-0.986c-0.439,-0.526 -2.804,-1.139
    -4.535,-1.139c-0.19,-0.006 -0.38,0.001 -0.57,0.022l0.022,4.797c0.701,0.438
    1.556,0.482 2.103,0.482c2.41,-0 7.404,-0.416 7.404,-4.316c0,-3.855
    -4.928,-6.834 -8.609,-8.236c-2.517,-0.994 -5.201,-1.5
    -7.908,-1.49c-0.604,-0.01 -1.208,0.056 -1.796,0.197c-0.372,0.088
    -0.504,0.176 -0.504,0.263c0,0.153 0.745,0.241 0.833,0.285c0.063,0.037
    0.104,0.102 0.109,0.175c-0.005,0.068 -0.037,0.131 -0.087,0.175c-0.088,0
    -0.285,0.022 -0.526,0.022Zm7.119,7.689c-2.168,0.176 -4.578,0.395
    -4.578,1.161c0,0.592 1.008,1.315 1.621,1.775c0.812,0.635 1.755,1.084
    2.76,1.314l0.197,-4.25Zm11.115,-9.814c-0.021,0.426 -0.042,0.938
    -0.042,1.716c-0,0.299 -0,0.64 0.01,1.024c-0.042,0.192 -0.319,0.213
    -0.458,0.277c-0.094,-0.052 -0.18,-0.116 -0.256,-0.192l0,-2.697c0,-0.288
    0.011,-0.586 0.011,-1.034c-0,-0.224 -0,-0.48 -0.011,-0.789c0,-0.192
    0.032,-0.373 0.15,-0.799c0.046,-0.127 0.163,-0.215 0.298,-0.224c0.245,0.064
    0.49,0.17 0.576,0.373c-0.256,0.757 -0.235,1.588
    -0.278,2.345Zm-0.383,-0.085c0.426,0.021 0.938,0.042 1.716,0.042c0.298,-0
    0.64,-0 1.023,-0.011c0.192,0.042 0.214,0.32 0.278,0.458c-0.052,0.094
    -0.116,0.18 -0.192,0.256l-2.697,0.001c-0.288,0 -0.587,-0.011
    -1.034,-0.01c-0.224,-0 -0.48,-0 -0.789,0.01c-0.192,0.001 -0.373,-0.031
    -0.8,-0.149c-0.126,-0.046 -0.214,-0.163 -0.224,-0.298c0.064,-0.245
    0.171,-0.49 0.373,-0.576c0.757,0.256 1.589,0.234 2.346,0.277Z

However, that came from : https://github.com/elax46/custom-brand-icons - So you might want to consider supporting that icon pack too.

usernein commented 2 years ago

Since v0.5.0, tv-card support all icon packs you can use in Home Assistant. You can install custom-brand-icons through HACS and use phu:disney-plus as icon

usernein commented 2 years ago

And thanks for sharing that!