Browse Source

add files from top-level folder (#541)

pull/542/head
Jason Dove 5 years ago committed by GitHub
parent
commit
b62ee4dee9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      CHANGELOG.md
  2. 10
      ErsatzTV.Core/Metadata/OtherVideoFolderScanner.cs
  3. 10
      ErsatzTV.Core/Metadata/SongFolderScanner.cs

2
CHANGELOG.md

@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [Unreleased] ## [Unreleased]
### Fixed
- Fix other video and song scanners to include videos contained directly in top-level folders that are added to a library
## [0.3.3-alpha] - 2021-12-12 ## [0.3.3-alpha] - 2021-12-12
### Fixed ### Fixed

10
ErsatzTV.Core/Metadata/OtherVideoFolderScanner.cs

@ -77,9 +77,15 @@ namespace ErsatzTV.Core.Metadata
var foldersCompleted = 0; var foldersCompleted = 0;
var folderQueue = new Queue<string>(); var folderQueue = new Queue<string>();
if (ShouldIncludeFolder(libraryPath.Path))
{
folderQueue.Enqueue(libraryPath.Path);
}
foreach (string folder in _localFileSystem.ListSubdirectories(libraryPath.Path) foreach (string folder in _localFileSystem.ListSubdirectories(libraryPath.Path)
.Filter(ShouldIncludeFolder) .Filter(ShouldIncludeFolder)
.OrderBy(identity)) .OrderBy(identity))
{ {
folderQueue.Enqueue(folder); folderQueue.Enqueue(folder);
} }

10
ErsatzTV.Core/Metadata/SongFolderScanner.cs

@ -79,9 +79,15 @@ namespace ErsatzTV.Core.Metadata
var foldersCompleted = 0; var foldersCompleted = 0;
var folderQueue = new Queue<string>(); var folderQueue = new Queue<string>();
if (ShouldIncludeFolder(libraryPath.Path))
{
folderQueue.Enqueue(libraryPath.Path);
}
foreach (string folder in _localFileSystem.ListSubdirectories(libraryPath.Path) foreach (string folder in _localFileSystem.ListSubdirectories(libraryPath.Path)
.Filter(ShouldIncludeFolder) .Filter(ShouldIncludeFolder)
.OrderBy(identity)) .OrderBy(identity))
{ {
folderQueue.Enqueue(folder); folderQueue.Enqueue(folder);
} }

Loading…
Cancel
Save