Skip to content

Commit

Permalink
fix: also fix it for events
Browse files Browse the repository at this point in the history
- Same as previous commit, but for the the method that gets all available folders.
  • Loading branch information
revam committed Aug 24, 2024
1 parent bd8fe03 commit ec0d30d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Shokofin/Configuration/MediaFolderConfigurationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,13 @@ private void OnLibraryManagerItemRemoved(object? sender, ItemChangeEventArgs e)
.ToList() as IReadOnlyList<MediaFolderConfiguration>
))
.Where(tuple => tuple.libraryFolder is not null && tuple.virtualFolder is not null && tuple.virtualFolder.Locations.Length is > 0 && tuple.mediaList.Count is > 0)
.Select(tuple => (tuple.libraryFolder!.GetVirtualRoot(), tuple.virtualFolder!.Locations[0], LibraryManager.GetConfiguredContentType(tuple.libraryFolder!), tuple.mediaList))
.Select(tuple => (
vfsPath: tuple.libraryFolder!.GetVirtualRoot(),
mainMediaFolderPath: tuple.virtualFolder!.Locations.FirstOrDefault(a => DirectoryService.IsAccessible(a)) ?? string.Empty,
collectionType: LibraryManager.GetConfiguredContentType(tuple.libraryFolder!),
tuple.mediaList
))
.Where(tuple => !string.IsNullOrEmpty(tuple.vfsPath) && !string.IsNullOrEmpty(tuple.mainMediaFolderPath))
.ToList();
}
}
Expand Down

0 comments on commit ec0d30d

Please sign in to comment.