Skip to content

Commit

Permalink
fix: make file events great again!
Browse files Browse the repository at this point in the history
- Fix the the extension method to get the media folder from a path to refresh the library itself when adding files for new series not in the media library.
  • Loading branch information
revam committed Jun 26, 2024
1 parent d4301cc commit 9d5de34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Shokofin/Configuration/MediaFolderConfigurationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace Shokofin.Configuration;
public static class MediaFolderConfigurationExtensions
{
public static Folder GetFolderForPath(this string mediaFolderPath)
=> BaseItem.LibraryManager.GetItemById(mediaFolderPath) as Folder ??
=> BaseItem.LibraryManager.FindByPath(mediaFolderPath, true) as Folder ??
throw new Exception($"Unable to find folder by path \"{mediaFolderPath}\".");

public static IReadOnlyList<(int importFolderId, string importFolderSubPath, IReadOnlyList<string> mediaFolderPaths)> ToImportFolderList(this IEnumerable<MediaFolderConfiguration> mediaConfigs)
Expand Down

0 comments on commit 9d5de34

Please sign in to comment.