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