|
|
@ -44,6 +44,33 @@ namespace MediaBrowser.Controller.Resolvers
|
|
|
|
".webm"
|
|
|
|
".webm"
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// The audio file extensions
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
private static readonly string[] AudioFileExtensions = new[] {
|
|
|
|
|
|
|
|
".mp3",
|
|
|
|
|
|
|
|
".flac",
|
|
|
|
|
|
|
|
".wma",
|
|
|
|
|
|
|
|
".aac",
|
|
|
|
|
|
|
|
".acc",
|
|
|
|
|
|
|
|
".m4a",
|
|
|
|
|
|
|
|
".m4b",
|
|
|
|
|
|
|
|
".wav",
|
|
|
|
|
|
|
|
".ape",
|
|
|
|
|
|
|
|
".ogg",
|
|
|
|
|
|
|
|
".oga"
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// Determines whether [is audio file] [the specified args].
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
/// <param name="path">The path.</param>
|
|
|
|
|
|
|
|
/// <returns><c>true</c> if [is audio file] [the specified args]; otherwise, <c>false</c>.</returns>
|
|
|
|
|
|
|
|
public static bool IsAudioFile(string path)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return AudioFileExtensions.Contains(Path.GetExtension(path), StringComparer.OrdinalIgnoreCase);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Determines whether [is video file] [the specified path].
|
|
|
|
/// Determines whether [is video file] [the specified path].
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
@ -51,7 +78,7 @@ namespace MediaBrowser.Controller.Resolvers
|
|
|
|
/// <returns><c>true</c> if [is video file] [the specified path]; otherwise, <c>false</c>.</returns>
|
|
|
|
/// <returns><c>true</c> if [is video file] [the specified path]; otherwise, <c>false</c>.</returns>
|
|
|
|
public static bool IsVideoFile(string path)
|
|
|
|
public static bool IsVideoFile(string path)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var extension = Path.GetExtension(path) ?? string.Empty;
|
|
|
|
var extension = Path.GetExtension(path) ?? String.Empty;
|
|
|
|
return VideoFileExtensions.Contains(extension, StringComparer.OrdinalIgnoreCase);
|
|
|
|
return VideoFileExtensions.Contains(extension, StringComparer.OrdinalIgnoreCase);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|