diff --git a/src/components/ChannelItem.svelte b/src/components/ChannelItem.svelte index 4c601b586..51c613b22 100644 --- a/src/components/ChannelItem.svelte +++ b/src/components/ChannelItem.svelte @@ -3,6 +3,7 @@ import StreamsPopup from './StreamsPopup.svelte' import GuidesPopup from './GuidesPopup.svelte' import ChannelPopup from './ChannelPopup.svelte' + import { search, query, hasQuery, setSearchParam } from '../store.js' export let channel @@ -29,6 +30,20 @@ { transitionBgProps: { duration: 0 }, transitionWindowProps: { duration: 0 } } ) } + + function pluralize(number, word) { + return number > 1 ? word + 's' : word + } + + function searchBy(q) { + if ($query !== q) { + query.set(q) + hasQuery.set(true) + search(q) + setSearchParam('q', q) + } + close() + } - +
- - {channel.name} - +
+ + {channel.name} + + {#if channel._searchable.is === 'closed'} +
+ Closed +
+ {/if} {#if channel.native_name} +
{channel.native_name}
+ {/if} +
{channel.id}
- {#if streams.length} - - {/if}{#if guides.length} + {#if guides.length} + {/if}{#if streams.length} + {/if}