aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities/Video.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/Entities/Video.cs')
-rw-r--r--MediaBrowser.Controller/Entities/Video.cs9
1 files changed, 5 insertions, 4 deletions
diff --git a/MediaBrowser.Controller/Entities/Video.cs b/MediaBrowser.Controller/Entities/Video.cs
index 25f47aead..76e0e1fc5 100644
--- a/MediaBrowser.Controller/Entities/Video.cs
+++ b/MediaBrowser.Controller/Entities/Video.cs
@@ -418,12 +418,13 @@ namespace MediaBrowser.Controller.Entities
{
IEnumerable<FileSystemInfo> files;
- var path = Path;
- var currentFilename = System.IO.Path.GetFileNameWithoutExtension(path) ?? string.Empty;
-
// Only support this for video files. For folder rips, they'll have to use the linking feature
if (VideoType == VideoType.VideoFile || VideoType == VideoType.Iso)
{
+ var path = Path;
+
+ var filenamePrefix = System.IO.Path.GetFileName(System.IO.Path.GetDirectoryName(path));
+
files = fileSystemChildren.Where(i =>
{
if ((i.Attributes & FileAttributes.Directory) == FileAttributes.Directory)
@@ -433,7 +434,7 @@ namespace MediaBrowser.Controller.Entities
return !string.Equals(i.FullName, path, StringComparison.OrdinalIgnoreCase) &&
EntityResolutionHelper.IsVideoFile(i.FullName) &&
- i.Name.StartsWith(currentFilename, StringComparison.OrdinalIgnoreCase);
+ i.Name.StartsWith(filenamePrefix + " - ", StringComparison.OrdinalIgnoreCase);
});
}
else