mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Support searching for tv programs
This commit is contained in:
parent
1be3d30027
commit
46daea5238
1 changed files with 6 additions and 33 deletions
|
@ -54,7 +54,6 @@ const LiveTVSearchResults: FunctionComponent<LiveTVSearchResultsProps> = ({ serv
|
||||||
IncludeArtists: false
|
IncludeArtists: false
|
||||||
});
|
});
|
||||||
|
|
||||||
// FIXME: This query does not support Live TV filters
|
|
||||||
const fetchItems = (apiClient: ApiClient, params = {}) => apiClient?.getItems(
|
const fetchItems = (apiClient: ApiClient, params = {}) => apiClient?.getItems(
|
||||||
apiClient?.getCurrentUserId(),
|
apiClient?.getCurrentUserId(),
|
||||||
{
|
{
|
||||||
|
@ -79,57 +78,31 @@ const LiveTVSearchResults: FunctionComponent<LiveTVSearchResultsProps> = ({ serv
|
||||||
// Movies row
|
// Movies row
|
||||||
fetchItems(apiClient, {
|
fetchItems(apiClient, {
|
||||||
IncludeItemTypes: 'LiveTvProgram',
|
IncludeItemTypes: 'LiveTvProgram',
|
||||||
IsMovie: true,
|
IsMovie: true
|
||||||
IsSeries: false,
|
|
||||||
IsSports: false,
|
|
||||||
IsKids: false,
|
|
||||||
IsNews: false
|
|
||||||
}).then(result => setMovies(result.Items || []));
|
}).then(result => setMovies(result.Items || []));
|
||||||
// Episodes row
|
// Episodes row
|
||||||
fetchItems(apiClient, {
|
fetchItems(apiClient, {
|
||||||
IncludeItemTypes: 'LiveTvProgram',
|
IncludeItemTypes: 'LiveTvProgram',
|
||||||
IsMovie: false,
|
IsSeries: true
|
||||||
IsSeries: true,
|
|
||||||
IsSports: false,
|
|
||||||
IsKids: false,
|
|
||||||
IsNews: false
|
|
||||||
}).then(result => setEpisodes(result.Items || []));
|
}).then(result => setEpisodes(result.Items || []));
|
||||||
// Sports row
|
// Sports row
|
||||||
fetchItems(apiClient, {
|
fetchItems(apiClient, {
|
||||||
IncludeItemTypes: 'LiveTvProgram',
|
IncludeItemTypes: 'LiveTvProgram',
|
||||||
IsMovie: false,
|
IsSports: true
|
||||||
IsSeries: false,
|
|
||||||
IsSports: true,
|
|
||||||
IsKids: false,
|
|
||||||
IsNews: false
|
|
||||||
}).then(result => setSports(result.Items || []));
|
}).then(result => setSports(result.Items || []));
|
||||||
// Kids row
|
// Kids row
|
||||||
fetchItems(apiClient, {
|
fetchItems(apiClient, {
|
||||||
IncludeItemTypes: 'LiveTvProgram',
|
IncludeItemTypes: 'LiveTvProgram',
|
||||||
IsMovie: false,
|
IsKids: true
|
||||||
IsSeries: false,
|
|
||||||
IsSports: false,
|
|
||||||
IsKids: true,
|
|
||||||
IsNews: false
|
|
||||||
}).then(result => setKids(result.Items || []));
|
}).then(result => setKids(result.Items || []));
|
||||||
// News row
|
// News row
|
||||||
fetchItems(apiClient, {
|
fetchItems(apiClient, {
|
||||||
IncludeItemTypes: 'LiveTvProgram',
|
IncludeItemTypes: 'LiveTvProgram',
|
||||||
IsMovie: false,
|
|
||||||
IsSeries: false,
|
|
||||||
IsSports: false,
|
|
||||||
IsKids: false,
|
|
||||||
IsNews: true
|
IsNews: true
|
||||||
}).then(result => setNews(result.Items || []));
|
}).then(result => setNews(result.Items || []));
|
||||||
// Programs row
|
// Programs row
|
||||||
fetchItems(apiClient, {
|
fetchItems(apiClient, { IncludeItemTypes: 'LiveTvProgram' })
|
||||||
IncludeItemTypes: 'LiveTvProgram',
|
.then(result => setPrograms(result.Items || []));
|
||||||
IsMovie: false,
|
|
||||||
IsSeries: false,
|
|
||||||
IsSports: false,
|
|
||||||
IsKids: false,
|
|
||||||
IsNews: false
|
|
||||||
}).then(result => setPrograms(result.Items || []));
|
|
||||||
// Channels row
|
// Channels row
|
||||||
fetchItems(apiClient, { IncludeItemTypes: 'TvChannel' })
|
fetchItems(apiClient, { IncludeItemTypes: 'TvChannel' })
|
||||||
.then(result => setChannels(result.Items || []));
|
.then(result => setChannels(result.Items || []));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue