From c7d520555b8fe6eacc0ed7ac384b6f16358a38ae Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 9 Dec 2016 02:23:09 -0500 Subject: update dlna profiles --- MediaBrowser.Controller/Entities/Movies/Movie.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'MediaBrowser.Controller') diff --git a/MediaBrowser.Controller/Entities/Movies/Movie.cs b/MediaBrowser.Controller/Entities/Movies/Movie.cs index 6ae4cf9f1..ec04879b5 100644 --- a/MediaBrowser.Controller/Entities/Movies/Movie.cs +++ b/MediaBrowser.Controller/Entities/Movies/Movie.cs @@ -125,7 +125,18 @@ namespace MediaBrowser.Controller.Entities.Movies if (!DetectIsInMixedFolder()) { - info.Name = System.IO.Path.GetFileName(ContainingFolderPath); + var name = System.IO.Path.GetFileName(ContainingFolderPath); + + if (VideoType == VideoType.VideoFile || VideoType == VideoType.Iso) + { + if (string.Equals(name, System.IO.Path.GetFileName(Path), StringComparison.OrdinalIgnoreCase)) + { + // if the folder has the file extension, strip it + name = System.IO.Path.GetFileNameWithoutExtension(name); + } + } + + info.Name = name; } return info; -- cgit v1.2.3