Skip to content

Commit

Permalink
Implement Jellyfin source
Browse files Browse the repository at this point in the history
  • Loading branch information
fmauNeko committed Feb 21, 2022
1 parent c53e4fe commit 5559aca
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/assets/icons/jellyfin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/js/components/Icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ const SourceIcon = ({
switch (source) {
case 'genius':
case 'tidal':
case 'jellyfin':
return <Icon name={source} type="svg" className="source" {...rest} />;
default:
return <Icon name={source} type="fontawesome" className="source" {...rest} />;
Expand Down
2 changes: 2 additions & 0 deletions src/js/locale/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ services:
title: YouTube
tidal:
title: Tidal
jellyfin:
title: Jellyfin

##
# Components
Expand Down
1 change: 1 addition & 0 deletions src/js/util/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ const sourceIcon = function (uri, source = null) {
case 'soundcloud':
case 'lastfm':
case 'tidal':
case 'jellyfin':
return source;

case 'youtube':
Expand Down
15 changes: 15 additions & 0 deletions src/js/util/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ const providers = {
uri: 'tidal:my_playlists',
title: i18n('services.tidal.title'),
},
{
scheme: 'jellyfin:',
uri: 'jellyfin:playlists',
title: i18n('services.jellyfin.title'),
},
],
albums: [
{
Expand Down Expand Up @@ -142,6 +147,11 @@ const providers = {
uri: 'ytmusic:album',
title: i18n('services.youtube.title'),
},
{
scheme: 'jellyfin:',
uri: 'jellyfin:albums',
title: i18n('services.jellyfin.title'),
},
],
artists: [
{
Expand Down Expand Up @@ -169,6 +179,11 @@ const providers = {
uri: 'ytmusic:artist',
title: i18n('services.youtube.title'),
},
{
scheme: 'jellyfin:',
uri: 'jellyfin:artists',
title: i18n('services.jellyfin.title'),
},
],
tracks: [
{
Expand Down

0 comments on commit 5559aca

Please sign in to comment.