mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #3662 from 1337joe/fix-tv-guide-search-2
Support searching for tv programs
(cherry picked from commit 57312e5cd5
)
Signed-off-by: crobibero <cody@robibe.ro>
This commit is contained in:
parent
621f40042c
commit
f5ee0dec4b
1 changed files with 3 additions and 20 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,11 +78,7 @@ 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, {
|
||||||
|
@ -97,28 +92,16 @@ const LiveTVSearchResults: FunctionComponent<LiveTVSearchResultsProps> = ({ serv
|
||||||
// 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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue