mirror of
https://github.com/fallenbagel/jellyseerr.git
synced 2026-01-01 04:08:45 -05:00
feat(api): adds support for Mixed Libraries
Adds support for mixed libraries with movies and show types fix #95
This commit is contained in:
@@ -177,11 +177,7 @@ class JellyfinAPI {
|
|||||||
|
|
||||||
const response: JellyfinLibrary[] = account.data.Items.filter(
|
const response: JellyfinLibrary[] = account.data.Items.filter(
|
||||||
(Item: any) => {
|
(Item: any) => {
|
||||||
return (
|
return Item.Type === 'CollectionFolder';
|
||||||
Item.Type === 'CollectionFolder' &&
|
|
||||||
(Item.CollectionType === 'tvshows' ||
|
|
||||||
Item.CollectionType === 'movies')
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
).map((Item: any) => {
|
).map((Item: any) => {
|
||||||
return <JellyfinLibrary>{
|
return <JellyfinLibrary>{
|
||||||
@@ -205,7 +201,7 @@ class JellyfinAPI {
|
|||||||
public async getLibraryContents(id: string): Promise<JellyfinLibraryItem[]> {
|
public async getLibraryContents(id: string): Promise<JellyfinLibraryItem[]> {
|
||||||
try {
|
try {
|
||||||
const contents = await this.axios.get<any>(
|
const contents = await this.axios.get<any>(
|
||||||
`/Users/${this.userId}/Items?SortBy=SortName&SortOrder=Ascending&IncludeItemTypes=Series,Movie&Recursive=true&StartIndex=0&ParentId=${id}`
|
`/Users/${this.userId}/Items?SortBy=SortName&SortOrder=Ascending&IncludeItemTypes=Series,Movie,Others&Recursive=true&StartIndex=0&ParentId=${id}`
|
||||||
);
|
);
|
||||||
|
|
||||||
return contents.data.Items.filter(
|
return contents.data.Items.filter(
|
||||||
|
|||||||
Reference in New Issue
Block a user