Skip to content

Commit 3d73114

Browse files
committed
feat: add Jellyfin as a built-in source icon
Register a `jellyfin` special icon alongside disney/amazon/dazn so users can set `icon: jellyfin` in their sources config. Adds jellyfinIcon() following the shared .st0 / var(--remote-text-color) convention, wires it into iconMapping and the default source grid, and documents the keyword in README.md and info.md. Also bumps the GitHub Actions to current majors (checkout v4, setup-node v4, upload-artifact v4) across the Build, Release and Validate workflows, since the old versions are deprecated and upload-artifact v3 now hard-fails on GitHub-hosted runners.
1 parent 54915b2 commit 3d73114

7 files changed

Lines changed: 34 additions & 12 deletions

File tree

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ jobs:
99
name: Build
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v1
12+
- uses: actions/checkout@v4
1313

14-
- uses: actions/setup-node@v3
14+
- uses: actions/setup-node@v4
1515
with:
1616
node-version: 20
1717

@@ -21,7 +21,7 @@ jobs:
2121
npm run build
2222
2323
- name: Archive built file
24-
uses: actions/upload-artifact@v3
24+
uses: actions/upload-artifact@v4
2525
with:
2626
name: lg-remote-control
2727
path: dist/lg-remote-control.js

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ jobs:
99
name: Prepare release
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v1
13-
14-
- uses: actions/setup-node@v3
12+
- uses: actions/checkout@v4
13+
14+
- uses: actions/setup-node@v4
1515
with:
1616
node-version: 20
1717

.github/workflows/validate.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout
12-
uses: actions/checkout@v3
12+
uses: actions/checkout@v4
1313

1414
- name: Validate HACS
1515
uses: "hacs/action@main"

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,16 @@ sources:
7979
- icon: 'mdi:youtube'
8080
name: "YouTube"
8181
```
82-
**Note:** `disney` `amazon` and `dazn` are special, icon you must enter them like this:
82+
**Note:** `disney` `amazon` `dazn` and `jellyfin` are special, icon you must enter them like this:
8383
```yaml
8484
- icon: disney
8585
name: Disney+
8686
- icon: amazon
8787
name: Prime Video
8888
- icon: dazn
8989
name: Dazn
90+
- icon: jellyfin
91+
name: Jellyfin
9092
```
9193
### Channels Options
9294
| Name | Type | Default | Supported options | Description |
@@ -263,6 +265,8 @@ in this new version we have implemented some new features:
263265
icon: disney
264266
- name: Dazn
265267
icon: dazn
268+
- name: Jellyfin
269+
icon: jellyfin
266270
- name: YouTube
267271
icon: 'mdi:youtube-tv'
268272
- name: HDMI 1
@@ -277,7 +281,7 @@ in this new version we have implemented some new features:
277281
278282
279283
```
280-
**note: disney and danz are special icon. so you you must enter it as in the example**
284+
**note: disney, danz and jellyfin are special icon. so you you must enter it as in the example**
281285

282286
## dimnensions option:
283287

info.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,16 @@ sources:
7979
- icon: 'mdi:youtube'
8080
name: "YouTube"
8181
```
82-
**Note:** `disney` `amazon` and `dazn` are special, icon you must enter them like this:
82+
**Note:** `disney` `amazon` `dazn` and `jellyfin` are special, icon you must enter them like this:
8383
```yaml
8484
- icon: disney
8585
name: Disney+
8686
- icon: amazon
8787
name: Prime Video
8888
- icon: dazn
8989
name: Dazn
90+
- icon: jellyfin
91+
name: Jellyfin
9092
```
9193
### Channels Options
9294
| Name | Type | Default | Supported options | Description |
@@ -264,6 +266,8 @@ in this new version we have implemented some new features:
264266
icon: disney
265267
- name: Dazn
266268
icon: dazn
269+
- name: Jellyfin
270+
icon: jellyfin
267271
- name: YouTube
268272
icon: 'mdi:youtube-tv'
269273
- name: HDMI 1
@@ -278,7 +282,7 @@ in this new version we have implemented some new features:
278282
279283
280284
```
281-
**note: disney and danz are special icon. so you you must enter it as in the example**
285+
**note: disney, danz and jellyfin are special icon. so you you must enter it as in the example**
282286

283287
## dimnensions option:
284288

src/icons.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,18 @@ export function disneyIcon() {
2424
`;
2525
}
2626

27+
export function jellyfinIcon() {
28+
return html`<svg version="1.1" id="Livello_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
29+
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
30+
<style type="text/css">
31+
.st0{fill:var(--remote-text-color);}
32+
</style>
33+
<path class="st0" d="M256,201.6c-20.4,0-86.2,119.3-76.2,139.4s142.5,19.9,152.4,0S276.5,201.6,256,201.6z"/>
34+
<path class="st0" d="M256,23.3c-61.6,0-259.8,359.4-229.6,420.1s429.3,60,459.2,0S317.6,23.3,256,23.3z M406.5,390.8c-19.6,39.3-281.1,39.8-300.9,0s110.1-275.3,150.4-275.3S426.1,351.4,406.5,390.8z"/>
35+
</svg>
36+
`;
37+
}
38+
2739
export function daznIcon() {
2840
return html`<svg version="1.0" id="Livello_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
2941
viewBox="0 0 30.7 30.7" style="enable-background:new 0 0 30.7 30.7;" xml:space="preserve">

src/lg-remote-control.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { customElement } from 'lit/decorators.js';
33
import { HomeAssistant } from 'custom-card-helpers';
44

55
import "./editor";
6-
import { lineOutIcon, amazonIcon, tvOpticIcon, daznIcon, disneyIcon, tvHeadphonesIcon, arcIcon, opticIcon, nowTvIcon } from "./icons";
6+
import { lineOutIcon, amazonIcon, tvOpticIcon, daznIcon, disneyIcon, jellyfinIcon, tvHeadphonesIcon, arcIcon, opticIcon, nowTvIcon } from "./icons";
77
import { HomeAssistantFixed, WindowWithCards } from "./types";
88
import { CARD_TAG_NAME, CARD_VERSION, EDITOR_CARD_TAG_NAME } from "./const";
99
import { getMediaPlayerEntitiesByPlatform } from "./utils";
@@ -72,6 +72,7 @@ class LgRemoteControl extends LitElement {
7272
"dazn": daznIcon(),
7373
"nowtv": nowTvIcon(),
7474
"amazon": amazonIcon(),
75+
"jellyfin": jellyfinIcon(),
7576
};
7677
}
7778

@@ -249,6 +250,7 @@ class LgRemoteControl extends LitElement {
249250
<button class="btn_source ripple" @click=${() => this._select_source("Prime Video")}>${amazonIcon()}</button>
250251
<button class="btn_source ripple" @click=${() => this._select_source("Disney+")}>${disneyIcon()}</button>
251252
<button class="btn_source ripple" @click=${() => this._select_source("DAZN")}>${daznIcon()}</button>
253+
<button class="btn_source ripple" @click=${() => this._select_source("Jellyfin")}>${jellyfinIcon()}</button>
252254
</div>`}
253255
<!-- ################################# SOURCE BUTTONS END ################################# -->
254256

0 commit comments

Comments
 (0)