mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Use shorthand syntax
This commit is contained in:
parent
1a33b510ce
commit
34f5be9440
8 changed files with 22 additions and 22 deletions
|
@ -13,7 +13,7 @@ export const fetchItemsByType = async (
|
|||
const response = await getItemsApi(api).getItems(
|
||||
{
|
||||
...QUERY_OPTIONS,
|
||||
userId: userId,
|
||||
userId,
|
||||
recursive: true,
|
||||
...params
|
||||
},
|
||||
|
|
|
@ -17,7 +17,7 @@ const fetchArtists = async (
|
|||
const response = await getArtistsApi(api).getArtists(
|
||||
{
|
||||
...QUERY_OPTIONS,
|
||||
userId: userId,
|
||||
userId,
|
||||
...params
|
||||
},
|
||||
options
|
||||
|
@ -39,8 +39,8 @@ export const useArtistsSearch = (
|
|||
api!,
|
||||
userId!,
|
||||
{
|
||||
parentId: parentId,
|
||||
searchTerm: searchTerm
|
||||
parentId,
|
||||
searchTerm
|
||||
},
|
||||
{ signal }
|
||||
),
|
||||
|
|
|
@ -19,7 +19,7 @@ const fetchLiveTv = (api: Api, userId: string | undefined, searchTerm: string |
|
|||
{
|
||||
includeItemTypes: [ BaseItemKind.LiveTvProgram ],
|
||||
isMovie: true,
|
||||
searchTerm: searchTerm
|
||||
searchTerm
|
||||
},
|
||||
{ signal }
|
||||
).then(moviesData => {
|
||||
|
@ -40,7 +40,7 @@ const fetchLiveTv = (api: Api, userId: string | undefined, searchTerm: string |
|
|||
isSports: false,
|
||||
isKids: false,
|
||||
isNews: false,
|
||||
searchTerm: searchTerm
|
||||
searchTerm
|
||||
},
|
||||
{ signal }
|
||||
).then(episodesData => {
|
||||
|
@ -56,7 +56,7 @@ const fetchLiveTv = (api: Api, userId: string | undefined, searchTerm: string |
|
|||
{
|
||||
includeItemTypes: [ BaseItemKind.LiveTvProgram ],
|
||||
isSports: true,
|
||||
searchTerm: searchTerm
|
||||
searchTerm
|
||||
},
|
||||
{ signal }
|
||||
).then(sportsData => {
|
||||
|
@ -72,7 +72,7 @@ const fetchLiveTv = (api: Api, userId: string | undefined, searchTerm: string |
|
|||
{
|
||||
includeItemTypes: [ BaseItemKind.LiveTvProgram ],
|
||||
isKids: true,
|
||||
searchTerm: searchTerm
|
||||
searchTerm
|
||||
},
|
||||
{ signal }
|
||||
).then(kidsData => {
|
||||
|
@ -88,7 +88,7 @@ const fetchLiveTv = (api: Api, userId: string | undefined, searchTerm: string |
|
|||
{
|
||||
includeItemTypes: [ BaseItemKind.LiveTvProgram ],
|
||||
isNews: true,
|
||||
searchTerm: searchTerm
|
||||
searchTerm
|
||||
},
|
||||
{ signal }
|
||||
).then(newsData => {
|
||||
|
@ -108,7 +108,7 @@ const fetchLiveTv = (api: Api, userId: string | undefined, searchTerm: string |
|
|||
isSports: false,
|
||||
isKids: false,
|
||||
isNews: false,
|
||||
searchTerm: searchTerm
|
||||
searchTerm
|
||||
},
|
||||
{ signal }
|
||||
).then(programsData => {
|
||||
|
@ -123,7 +123,7 @@ const fetchLiveTv = (api: Api, userId: string | undefined, searchTerm: string |
|
|||
userId,
|
||||
{
|
||||
includeItemTypes: [ BaseItemKind.TvChannel ],
|
||||
searchTerm: searchTerm
|
||||
searchTerm
|
||||
},
|
||||
{ signal }
|
||||
).then(channelsData => {
|
||||
|
|
|
@ -17,7 +17,7 @@ const fetchPeople = async (
|
|||
const response = await getPersonsApi(api).getPersons(
|
||||
{
|
||||
...QUERY_OPTIONS,
|
||||
userId: userId,
|
||||
userId,
|
||||
...params
|
||||
},
|
||||
options
|
||||
|
@ -41,7 +41,7 @@ export const usePeopleSearch = (
|
|||
api!,
|
||||
userId!,
|
||||
{
|
||||
searchTerm: searchTerm
|
||||
searchTerm
|
||||
},
|
||||
{ signal }
|
||||
),
|
||||
|
|
|
@ -40,8 +40,8 @@ export const useProgramsSearch = (
|
|||
api!,
|
||||
userId!,
|
||||
{
|
||||
parentId: parentId,
|
||||
searchTerm: searchTerm
|
||||
parentId,
|
||||
searchTerm
|
||||
},
|
||||
{ signal }
|
||||
),
|
||||
|
|
|
@ -64,8 +64,8 @@ export const useSearchItems = (
|
|||
userId,
|
||||
{
|
||||
includeItemTypes: itemTypes,
|
||||
parentId: parentId,
|
||||
searchTerm: searchTerm,
|
||||
parentId,
|
||||
searchTerm,
|
||||
limit: 800
|
||||
},
|
||||
{ signal }
|
||||
|
|
|
@ -14,7 +14,7 @@ const fetchGetItems = async (
|
|||
) => {
|
||||
const response = await getItemsApi(api).getItems(
|
||||
{
|
||||
userId: userId,
|
||||
userId,
|
||||
sortBy: [ItemSortBy.IsFavoriteOrLiked, ItemSortBy.Random],
|
||||
includeItemTypes: [
|
||||
BaseItemKind.Movie,
|
||||
|
@ -25,7 +25,7 @@ const fetchGetItems = async (
|
|||
recursive: true,
|
||||
imageTypeLimit: 0,
|
||||
enableImages: false,
|
||||
parentId: parentId,
|
||||
parentId,
|
||||
enableTotalRecordCount: false
|
||||
},
|
||||
options
|
||||
|
|
|
@ -18,7 +18,7 @@ const fetchVideos = async (
|
|||
const response = await getItemsApi(api).getItems(
|
||||
{
|
||||
...QUERY_OPTIONS,
|
||||
userId: userId,
|
||||
userId,
|
||||
recursive: true,
|
||||
mediaTypes: [MediaType.Video],
|
||||
excludeItemTypes: [
|
||||
|
@ -47,8 +47,8 @@ export const useVideoSearch = (
|
|||
api!,
|
||||
userId!,
|
||||
{
|
||||
parentId: parentId,
|
||||
searchTerm: searchTerm
|
||||
parentId,
|
||||
searchTerm
|
||||
},
|
||||
{ signal }
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue