Skip to content

Commit

Permalink
feat(epg): fix live channel casing
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonLantukh committed Jan 12, 2024
1 parent 0394daf commit 43c487c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const CONTENT_TYPE = {
// Page with a list of channels
live: 'live',
// Separate channel page
livechannel: 'livechannel',
liveChannel: 'liveChannel',
// Static page with markdown
page: 'page',
// Page with shelves list
Expand Down
2 changes: 1 addition & 1 deletion src/pages/ScreenRouting/MediaScreenRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const mediaScreenMap = new ScreenMap<PlaylistItem>();
// Register media screens
mediaScreenMap.registerByContentType(MediaSeries, CONTENT_TYPE.series);
mediaScreenMap.registerByContentType(MediaEpisode, CONTENT_TYPE.episode);
mediaScreenMap.registerByContentType(MediaLiveChannel, CONTENT_TYPE.livechannel);
mediaScreenMap.registerByContentType(MediaLiveChannel, CONTENT_TYPE.liveChannel);
mediaScreenMap.registerByContentType(MediaStaticPage, CONTENT_TYPE.page);
mediaScreenMap.registerDefault(MediaMovie);

Expand Down
2 changes: 1 addition & 1 deletion src/utils/media.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ export const getLegacySeriesPlaylistIdFromEpisodeTags = (item: PlaylistItem | un
};

export const isLiveChannel = (item: PlaylistItem): item is RequiredProperties<PlaylistItem, 'contentType' | 'liveChannelsId'> =>
item.contentType?.toLowerCase() === CONTENT_TYPE.livechannel && !!item.liveChannelsId;
item.contentType?.toLowerCase() === CONTENT_TYPE.liveChannel && !!item.liveChannelsId;

0 comments on commit 43c487c

Please sign in to comment.