mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-18 06:53:07 +03:00
Added poor man's multi-file movie support
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using System.Text.RegularExpressions;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.IO;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -45,6 +46,20 @@ namespace MediaBrowser.Controller.Resolvers
|
||||
".mts"
|
||||
};
|
||||
|
||||
private static readonly Regex MultiFileRegex = new Regex(
|
||||
@"(.*?)([ _.-]*(?:cd|dvd|p(?:ar)?t|dis[ck]|d)[ _.-]*[0-9]+)(.*?)(\.[^.]+)$",
|
||||
RegexOptions.Compiled);
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether [is multi part file] [the specified path].
|
||||
/// </summary>
|
||||
/// <param name="path">The path.</param>
|
||||
/// <returns><c>true</c> if [is multi part file] [the specified path]; otherwise, <c>false</c>.</returns>
|
||||
public static bool IsMultiPartFile(string path)
|
||||
{
|
||||
return MultiFileRegex.Match(path).Success;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The audio file extensions
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user