jellyfin-server/Emby.Naming/Audio/AudioFileParser.cs

20 lines
460 B
C#
Raw Normal View History

2020-04-19 09:57:03 +00:00
#nullable enable
#pragma warning disable CS1591
using System;
2018-09-12 17:26:21 +00:00
using System.IO;
using System.Linq;
using Emby.Naming.Common;
namespace Emby.Naming.Audio
{
2020-02-19 20:56:35 +00:00
public static class AudioFileParser
2018-09-12 17:26:21 +00:00
{
2020-02-19 20:56:35 +00:00
public static bool IsAudioFile(string path, NamingOptions options)
2018-09-12 17:26:21 +00:00
{
2020-04-19 09:57:03 +00:00
var extension = Path.GetExtension(path);
2020-02-19 20:56:35 +00:00
return options.AudioFileExtensions.Contains(extension, StringComparer.OrdinalIgnoreCase);
2018-09-12 17:26:21 +00:00
}
}
}