jellyfin/Emby.Naming/Audio/AudioFileParser.cs
Bond_009 5a8e972952 Enable TreatWarningsAsErrors for some projects
Analyzers are only run in debug build, so setting TreatWarningsAsErrors
for release build will catch the compiler warnings until we resolve all
analyzer warnings.
2019-12-13 20:11:37 +01:00

27 lines
611 B
C#

#pragma warning disable CS1591
#pragma warning disable SA1600
using System;
using System.IO;
using System.Linq;
using Emby.Naming.Common;
namespace Emby.Naming.Audio
{
public class AudioFileParser
{
private readonly NamingOptions _options;
public AudioFileParser(NamingOptions options)
{
_options = options;
}
public bool IsAudioFile(string path)
{
var extension = Path.GetExtension(path) ?? string.Empty;
return _options.AudioFileExtensions.Contains(extension, StringComparer.OrdinalIgnoreCase);
}
}
}