using System;
using System.IO;
using Emby.Naming.Common;
using Jellyfin.Extensions;
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.AsSpan());
return options.AudioFileExtensions.Contains(extension, StringComparison.OrdinalIgnoreCase);
}
}
}