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