fix(api): filter out libraries that do not have any metadata agent or are not movie/show

pull/304/head
sct 4 years ago
parent e08fa35548
commit 01c179f762

@ -93,7 +93,12 @@ settingsRoutes.get('/plex/library', async (req, res) => {
const libraries = await plexapi.getLibraries();
const newLibraries: Library[] = libraries.map((library) => {
const newLibraries: Library[] = libraries
// Remove libraries that are not movie or show
.filter((library) => library.type === 'movie' || library.type === 'show')
// Remove libraries that do not have a metadata agent set (usually personal video libraries)
.filter((library) => library.agent !== 'com.plexapp.agents.none')
.map((library) => {
const existing = settings.plex.libraries.find(
(l) => l.id === library.key
);

Loading…
Cancel
Save