mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-09 07:10:34 +02:00
better audio file check
This commit is contained in:
parent
75041e7f39
commit
3cfbe6e340
|
@ -117,10 +117,8 @@ namespace Emby.Server.Implementations.Library.Resolvers.Audio
|
|||
ILibraryManager libraryManager)
|
||||
{
|
||||
// check for audio files before digging down into directories
|
||||
var firstAudioFile = list
|
||||
.Where(fileSystemInfo => !fileSystemInfo.IsDirectory)
|
||||
.FirstOrDefault(fileSystemInfo => libraryManager.IsAudioFile(fileSystemInfo.FullName));
|
||||
if (firstAudioFile != null)
|
||||
var foundAudioFile = list.Any(fileSystemInfo => !fileSystemInfo.IsDirectory && libraryManager.IsAudioFile(fileSystemInfo.FullName));
|
||||
if (foundAudioFile)
|
||||
{
|
||||
// at least one audio file exists
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue