mirror of
https://github.com/aleksilassila/reiverr.git
synced 2026-04-24 09:45:11 +02:00
Improved library store & Partly working episode playback
This commit is contained in:
@@ -59,7 +59,7 @@ export const getJellyfinItems = () =>
|
||||
// }
|
||||
// }).then((r) => r.data?.Items || []);
|
||||
|
||||
export const getJellyfinEpisodes = (seriesId: string) =>
|
||||
export const getJellyfinEpisodes = () =>
|
||||
JellyfinApi.get('/Users/{userId}/Items', {
|
||||
params: {
|
||||
path: {
|
||||
@@ -73,7 +73,10 @@ export const getJellyfinEpisodes = (seriesId: string) =>
|
||||
headers: {
|
||||
'cache-control': 'max-age=10'
|
||||
}
|
||||
}).then((r) => r.data?.Items?.filter((i) => i.SeriesId === seriesId) || []);
|
||||
}).then((r) => r.data?.Items || []);
|
||||
|
||||
export const getJellyfinEpisodesBySeries = (seriesId: string) =>
|
||||
getJellyfinEpisodes().then((items) => items.filter((i) => i.SeriesId === seriesId) || []);
|
||||
|
||||
export const getJellyfinItemByTmdbId = (tmdbId: string) =>
|
||||
getJellyfinItems().then((items) => items.find((i) => i.ProviderIds?.Tmdb == tmdbId));
|
||||
|
||||
@@ -20,6 +20,7 @@ export interface TmdbMovieFull2 extends TmdbMovie2 {
|
||||
videos: operations['movie-videos']['responses']['200']['content']['application/json'];
|
||||
credits: operations['movie-credits']['responses']['200']['content']['application/json'];
|
||||
external_ids: operations['movie-external-ids']['responses']['200']['content']['application/json'];
|
||||
images: operations['movie-images']['responses']['200']['content']['application/json'];
|
||||
}
|
||||
|
||||
export interface TmdbSeriesFull2 extends TmdbSeries2 {
|
||||
@@ -43,7 +44,8 @@ export const getTmdbMovie = async (tmdbId: number) =>
|
||||
movie_id: tmdbId
|
||||
},
|
||||
query: {
|
||||
append_to_response: 'videos,credits,external_ids'
|
||||
append_to_response: 'videos,credits,external_ids,images',
|
||||
...({ include_image_language: get(settings).language + ',en,null' } as any)
|
||||
}
|
||||
}
|
||||
}).then((res) => res.data as TmdbMovieFull2 | undefined);
|
||||
|
||||
Reference in New Issue
Block a user