{{ 'PORTALS.SIDEBAR.SEARCH' | translate }}

@if (isGlobalSearch) { }
@if (!isGlobalSearch && xtreamStore.searchResults().length > 0) {
Found {{ xtreamStore.searchResults().length }} results
}
@if (xtreamStore.searchResults().length > 0) { @if (isGlobalSearch) {

Found {{ xtreamStore.searchResults().length }} items across {{ (getGroupedResults() | keyvalue).length }} playlists

@for ( group of getGroupedResults() | keyvalue; track group.key ) {

playlist_play {{ group.key }} ({{ $any(group).value.length }} items)

@for ( item of $any(group).value; track item.id ) { }
}
} @else {
@for (item of xtreamStore.searchResults(); track item.id) { @if (item.poster_url) { } @if (!item.poster_url) {
movie
}

{{ item.title }}

{{ item.description }}

{{ item.type }}
@if (item.playlist_id && isGlobalSearch) {
{{ item.playlist_name }}
} @if (isGlobalSearch && item.playlist_name) {
playlist_play {{ item.playlist_name }}
}
}
} } @else if (searchTerm && searchTerm.length >= 3) {
search_off

No results found for "{{ searchTerm() }}"

}