Skip to content

Commit

Permalink
feat(api): adds support for Mixed Libraries
Browse files Browse the repository at this point in the history
Adds support for mixed libraries with movies and show types

fix #95
  • Loading branch information
Fallenbagel committed Dec 16, 2022
1 parent 2d99a8b commit ba82ece
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions server/api/jellyfin.ts
Expand Up @@ -177,11 +177,7 @@ class JellyfinAPI {

const response: JellyfinLibrary[] = account.data.Items.filter(
(Item: any) => {
return (
Item.Type === 'CollectionFolder' &&
(Item.CollectionType === 'tvshows' ||
Item.CollectionType === 'movies')
);
return Item.Type === 'CollectionFolder';
}
).map((Item: any) => {
return <JellyfinLibrary>{
Expand All @@ -205,7 +201,7 @@ class JellyfinAPI {
public async getLibraryContents(id: string): Promise<JellyfinLibraryItem[]> {
try {
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(
Expand Down

0 comments on commit ba82ece

Please sign in to comment.