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(
|
const response = await getItemsApi(api).getItems(
|
||||||
{
|
{
|
||||||
...QUERY_OPTIONS,
|
...QUERY_OPTIONS,
|
||||||
userId: userId,
|
userId,
|
||||||
recursive: true,
|
recursive: true,
|
||||||
...params
|
...params
|
||||||
},
|
},
|
||||||
|
|
|
@ -17,7 +17,7 @@ const fetchArtists = async (
|
||||||
const response = await getArtistsApi(api).getArtists(
|
const response = await getArtistsApi(api).getArtists(
|
||||||
{
|
{
|
||||||
...QUERY_OPTIONS,
|
...QUERY_OPTIONS,
|
||||||
userId: userId,
|
userId,
|
||||||
...params
|
...params
|
||||||
},
|
},
|
||||||
options
|
options
|
||||||
|
@ -39,8 +39,8 @@ export const useArtistsSearch = (
|
||||||
api!,
|
api!,
|
||||||
userId!,
|
userId!,
|
||||||
{
|
{
|
||||||
parentId: parentId,
|
parentId,
|
||||||
searchTerm: searchTerm
|
searchTerm
|
||||||
},
|
},
|
||||||
{ signal }
|
{ signal }
|
||||||
),
|
),
|
||||||
|
|
|
@ -19,7 +19,7 @@ const fetchLiveTv = (api: Api, userId: string | undefined, searchTerm: string |
|
||||||
{
|
{
|
||||||
includeItemTypes: [ BaseItemKind.LiveTvProgram ],
|
includeItemTypes: [ BaseItemKind.LiveTvProgram ],
|
||||||
isMovie: true,
|
isMovie: true,
|
||||||
searchTerm: searchTerm
|
searchTerm
|
||||||
},
|
},
|
||||||
{ signal }
|
{ signal }
|
||||||
).then(moviesData => {
|
).then(moviesData => {
|
||||||
|
@ -40,7 +40,7 @@ const fetchLiveTv = (api: Api, userId: string | undefined, searchTerm: string |
|
||||||
isSports: false,
|
isSports: false,
|
||||||
isKids: false,
|
isKids: false,
|
||||||
isNews: false,
|
isNews: false,
|
||||||
searchTerm: searchTerm
|
searchTerm
|
||||||
},
|
},
|
||||||
{ signal }
|
{ signal }
|
||||||
).then(episodesData => {
|
).then(episodesData => {
|
||||||
|
@ -56,7 +56,7 @@ const fetchLiveTv = (api: Api, userId: string | undefined, searchTerm: string |
|
||||||
{
|
{
|
||||||
includeItemTypes: [ BaseItemKind.LiveTvProgram ],
|
includeItemTypes: [ BaseItemKind.LiveTvProgram ],
|
||||||
isSports: true,
|
isSports: true,
|
||||||
searchTerm: searchTerm
|
searchTerm
|
||||||
},
|
},
|
||||||
{ signal }
|
{ signal }
|
||||||
).then(sportsData => {
|
).then(sportsData => {
|
||||||
|
@ -72,7 +72,7 @@ const fetchLiveTv = (api: Api, userId: string | undefined, searchTerm: string |
|
||||||
{
|
{
|
||||||
includeItemTypes: [ BaseItemKind.LiveTvProgram ],
|
includeItemTypes: [ BaseItemKind.LiveTvProgram ],
|
||||||
isKids: true,
|
isKids: true,
|
||||||
searchTerm: searchTerm
|
searchTerm
|
||||||
},
|
},
|
||||||
{ signal }
|
{ signal }
|
||||||
).then(kidsData => {
|
).then(kidsData => {
|
||||||
|
@ -88,7 +88,7 @@ const fetchLiveTv = (api: Api, userId: string | undefined, searchTerm: string |
|
||||||
{
|
{
|
||||||
includeItemTypes: [ BaseItemKind.LiveTvProgram ],
|
includeItemTypes: [ BaseItemKind.LiveTvProgram ],
|
||||||
isNews: true,
|
isNews: true,
|
||||||
searchTerm: searchTerm
|
searchTerm
|
||||||
},
|
},
|
||||||
{ signal }
|
{ signal }
|
||||||
).then(newsData => {
|
).then(newsData => {
|
||||||
|
@ -108,7 +108,7 @@ const fetchLiveTv = (api: Api, userId: string | undefined, searchTerm: string |
|
||||||
isSports: false,
|
isSports: false,
|
||||||
isKids: false,
|
isKids: false,
|
||||||
isNews: false,
|
isNews: false,
|
||||||
searchTerm: searchTerm
|
searchTerm
|
||||||
},
|
},
|
||||||
{ signal }
|
{ signal }
|
||||||
).then(programsData => {
|
).then(programsData => {
|
||||||
|
@ -123,7 +123,7 @@ const fetchLiveTv = (api: Api, userId: string | undefined, searchTerm: string |
|
||||||
userId,
|
userId,
|
||||||
{
|
{
|
||||||
includeItemTypes: [ BaseItemKind.TvChannel ],
|
includeItemTypes: [ BaseItemKind.TvChannel ],
|
||||||
searchTerm: searchTerm
|
searchTerm
|
||||||
},
|
},
|
||||||
{ signal }
|
{ signal }
|
||||||
).then(channelsData => {
|
).then(channelsData => {
|
||||||
|
|
|
@ -17,7 +17,7 @@ const fetchPeople = async (
|
||||||
const response = await getPersonsApi(api).getPersons(
|
const response = await getPersonsApi(api).getPersons(
|
||||||
{
|
{
|
||||||
...QUERY_OPTIONS,
|
...QUERY_OPTIONS,
|
||||||
userId: userId,
|
userId,
|
||||||
...params
|
...params
|
||||||
},
|
},
|
||||||
options
|
options
|
||||||
|
@ -41,7 +41,7 @@ export const usePeopleSearch = (
|
||||||
api!,
|
api!,
|
||||||
userId!,
|
userId!,
|
||||||
{
|
{
|
||||||
searchTerm: searchTerm
|
searchTerm
|
||||||
},
|
},
|
||||||
{ signal }
|
{ signal }
|
||||||
),
|
),
|
||||||
|
|
|
@ -40,8 +40,8 @@ export const useProgramsSearch = (
|
||||||
api!,
|
api!,
|
||||||
userId!,
|
userId!,
|
||||||
{
|
{
|
||||||
parentId: parentId,
|
parentId,
|
||||||
searchTerm: searchTerm
|
searchTerm
|
||||||
},
|
},
|
||||||
{ signal }
|
{ signal }
|
||||||
),
|
),
|
||||||
|
|
|
@ -64,8 +64,8 @@ export const useSearchItems = (
|
||||||
userId,
|
userId,
|
||||||
{
|
{
|
||||||
includeItemTypes: itemTypes,
|
includeItemTypes: itemTypes,
|
||||||
parentId: parentId,
|
parentId,
|
||||||
searchTerm: searchTerm,
|
searchTerm,
|
||||||
limit: 800
|
limit: 800
|
||||||
},
|
},
|
||||||
{ signal }
|
{ signal }
|
||||||
|
|
|
@ -14,7 +14,7 @@ const fetchGetItems = async (
|
||||||
) => {
|
) => {
|
||||||
const response = await getItemsApi(api).getItems(
|
const response = await getItemsApi(api).getItems(
|
||||||
{
|
{
|
||||||
userId: userId,
|
userId,
|
||||||
sortBy: [ItemSortBy.IsFavoriteOrLiked, ItemSortBy.Random],
|
sortBy: [ItemSortBy.IsFavoriteOrLiked, ItemSortBy.Random],
|
||||||
includeItemTypes: [
|
includeItemTypes: [
|
||||||
BaseItemKind.Movie,
|
BaseItemKind.Movie,
|
||||||
|
@ -25,7 +25,7 @@ const fetchGetItems = async (
|
||||||
recursive: true,
|
recursive: true,
|
||||||
imageTypeLimit: 0,
|
imageTypeLimit: 0,
|
||||||
enableImages: false,
|
enableImages: false,
|
||||||
parentId: parentId,
|
parentId,
|
||||||
enableTotalRecordCount: false
|
enableTotalRecordCount: false
|
||||||
},
|
},
|
||||||
options
|
options
|
||||||
|
|
|
@ -18,7 +18,7 @@ const fetchVideos = async (
|
||||||
const response = await getItemsApi(api).getItems(
|
const response = await getItemsApi(api).getItems(
|
||||||
{
|
{
|
||||||
...QUERY_OPTIONS,
|
...QUERY_OPTIONS,
|
||||||
userId: userId,
|
userId,
|
||||||
recursive: true,
|
recursive: true,
|
||||||
mediaTypes: [MediaType.Video],
|
mediaTypes: [MediaType.Video],
|
||||||
excludeItemTypes: [
|
excludeItemTypes: [
|
||||||
|
@ -47,8 +47,8 @@ export const useVideoSearch = (
|
||||||
api!,
|
api!,
|
||||||
userId!,
|
userId!,
|
||||||
{
|
{
|
||||||
parentId: parentId,
|
parentId,
|
||||||
searchTerm: searchTerm
|
searchTerm
|
||||||
},
|
},
|
||||||
{ signal }
|
{ signal }
|
||||||
),
|
),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue