fix(plex): do not fail to scan empty libraries (#1771)

* fix(plex): do not fail to scan empty libraries

* fix(plex): ensure getLibraryContents returns array
pull/1734/head
TheCatLady 3 years ago committed by GitHub
parent de56380c05
commit 6789b8701c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -142,7 +142,7 @@ class PlexAPI {
`/library/sections/${id}/all` `/library/sections/${id}/all`
); );
return response.MediaContainer.Metadata; return response.MediaContainer.Metadata ?? [];
} }
public async getMetadata( public async getMetadata(

@ -7,9 +7,9 @@ import { User } from '../../../entity/User';
import { getSettings, Library } from '../../settings'; import { getSettings, Library } from '../../settings';
import BaseScanner, { import BaseScanner, {
MediaIds, MediaIds,
ProcessableSeason,
RunnableScanner, RunnableScanner,
StatusBase, StatusBase,
ProcessableSeason,
} from '../baseScanner'; } from '../baseScanner';
const imdbRegex = new RegExp(/imdb:\/\/(tt[0-9]+)/); const imdbRegex = new RegExp(/imdb:\/\/(tt[0-9]+)/);

Loading…
Cancel
Save