using System;
using System.IO;
using System.Linq;
using Emby.Naming.Common;
namespace Emby.Naming.Audio
{
///
/// Static helper class to determine if file at path is audio file.
///
public static class AudioFileParser
{
///
/// Static helper method to determine if file at path is audio file.
///
/// Path to file.
/// containing AudioFileExtensions.
/// True if file at path is audio file.
public static bool IsAudioFile(string path, NamingOptions options)
{
var extension = Path.GetExtension(path);
return options.AudioFileExtensions.Contains(extension, StringComparer.OrdinalIgnoreCase);
}
}
}