Skip to content

Commit

Permalink
Merge pull request #125 from sambartik/fix-scan
Browse files Browse the repository at this point in the history
fix(scan): ignore virtual seasons
  • Loading branch information
Fallenbagel authored Jun 5, 2022
2 parents 5298e5f + 6574e18 commit a1cd354
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/api/jellyfin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export interface JellyfinLibraryItem {
Id: string;
HasSubtitles: boolean;
Type: 'Movie' | 'Episode' | 'Season' | 'Series';
LocationType: 'FileSystem' | 'Offline' | 'Remote' | 'Virtual';
SeriesName?: string;
SeriesId?: string;
SeasonId?: string;
Expand Down Expand Up @@ -251,7 +252,9 @@ class JellyfinAPI {
try {
const contents = await this.axios.get<any>(`/Shows/${seriesID}/Seasons`);

return contents.data.Items;
return contents.data.Items.filter(
(item: JellyfinLibraryItem) => item.LocationType !== 'Virtual'
);
} catch (e) {
logger.error(
`Something went wrong while getting the list of seasons from the Jellyfin server: ${e.message}`,
Expand Down

0 comments on commit a1cd354

Please sign in to comment.