Skip to content

Commit

Permalink
chore: singular to plural in method names
Browse files Browse the repository at this point in the history
  • Loading branch information
revam committed Sep 29, 2024
1 parent 96518c5 commit 1ac96b2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Shokofin/Resolvers/VirtualFileSystemService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ private void OnLibraryManagerItemRemoved(object? sender, ItemChangeEventArgs e)
string? pathToClean = null;
IEnumerable<(string sourceLocation, string fileId, string seriesId)>? allFiles = null;
if (path.StartsWith(vfsPath + Path.DirectorySeparatorChar)) {
var allPaths = GetPathsForMediaFolder(mediaConfigs);
var allPaths = GetPathsForMediaFolders(mediaConfigs);
var pathSegments = path[(vfsPath.Length + 1)..].Split(Path.DirectorySeparatorChar);
switch (pathSegments.Length) {
// show/movie-folder level
Expand Down Expand Up @@ -244,9 +244,9 @@ private void OnLibraryManagerItemRemoved(object? sender, ItemChangeEventArgs e)
}
// Iterate files in the "real" media folder.
else if (mediaConfigs.Any(config => path.StartsWith(config.MediaFolderPath)) || path == vfsPath) {
var allPaths = GetPathsForMediaFolder(mediaConfigs);
var allPaths = GetPathsForMediaFolders(mediaConfigs);
pathToClean = vfsPath;
allFiles = GetFilesForImportFolder(mediaConfigs, allPaths);
allFiles = GetFilesForImportFolders(mediaConfigs, allPaths);
}

if (allFiles is null)
Expand Down Expand Up @@ -274,7 +274,7 @@ private void OnLibraryManagerItemRemoved(object? sender, ItemChangeEventArgs e)
);
}

private HashSet<string> GetPathsForMediaFolder(IReadOnlyList<MediaFolderConfiguration> mediaConfigs)
private HashSet<string> GetPathsForMediaFolders(IReadOnlyList<MediaFolderConfiguration> mediaConfigs)
{
var libraryId = mediaConfigs[0].LibraryId;
Logger.LogDebug("Looking for files in library across {Count} folders. (Library={LibraryId})", mediaConfigs.Count, libraryId);
Expand Down Expand Up @@ -519,7 +519,7 @@ private HashSet<string> GetPathsForMediaFolder(IReadOnlyList<MediaFolderConfigur
);
}

private IEnumerable<(string sourceLocation, string fileId, string seriesId)> GetFilesForImportFolder(IReadOnlyList<MediaFolderConfiguration> mediaConfigs, HashSet<string> fileSet)
private IEnumerable<(string sourceLocation, string fileId, string seriesId)> GetFilesForImportFolders(IReadOnlyList<MediaFolderConfiguration> mediaConfigs, HashSet<string> fileSet)
{
var start = DateTime.UtcNow;
var singleSeriesIds = new HashSet<int>();
Expand Down

0 comments on commit 1ac96b2

Please sign in to comment.