Merge pull request #125 from sambartik/fix-scan
fix(scan): ignore virtual seasons
This commit is contained in:
@@ -31,6 +31,7 @@ export interface JellyfinLibraryItem {
|
|||||||
Id: string;
|
Id: string;
|
||||||
HasSubtitles: boolean;
|
HasSubtitles: boolean;
|
||||||
Type: 'Movie' | 'Episode' | 'Season' | 'Series';
|
Type: 'Movie' | 'Episode' | 'Season' | 'Series';
|
||||||
|
LocationType: 'FileSystem' | 'Offline' | 'Remote' | 'Virtual';
|
||||||
SeriesName?: string;
|
SeriesName?: string;
|
||||||
SeriesId?: string;
|
SeriesId?: string;
|
||||||
SeasonId?: string;
|
SeasonId?: string;
|
||||||
@@ -251,7 +252,9 @@ class JellyfinAPI {
|
|||||||
try {
|
try {
|
||||||
const contents = await this.axios.get<any>(`/Shows/${seriesID}/Seasons`);
|
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) {
|
} catch (e) {
|
||||||
logger.error(
|
logger.error(
|
||||||
`Something went wrong while getting the list of seasons from the Jellyfin server: ${e.message}`,
|
`Something went wrong while getting the list of seasons from the Jellyfin server: ${e.message}`,
|
||||||
|
|||||||
Reference in New Issue
Block a user