diff options
| author | Tim Hobbs <jesus.tesh@gmail.com> | 2014-03-05 04:27:13 -0800 |
|---|---|---|
| committer | Tim Hobbs <jesus.tesh@gmail.com> | 2014-03-05 04:27:13 -0800 |
| commit | 482fde658746750075ff8a562ca1fb88f1739ef4 (patch) | |
| tree | 7bd5084ffa6be20a4533eb37d94f852f2d888a84 /MediaBrowser.Controller/Resolvers/BaseVideoResolver.cs | |
| parent | 604f971477da4dca5247f7d531323175ad044150 (diff) | |
| parent | 9396f16aed2f304789324afc83e0c9f385c5f00a (diff) | |
Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
Conflicts:
MediaBrowser.WebDashboard/dashboard-ui/scripts/mediaplayer.js
Diffstat (limited to 'MediaBrowser.Controller/Resolvers/BaseVideoResolver.cs')
| -rw-r--r-- | MediaBrowser.Controller/Resolvers/BaseVideoResolver.cs | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/MediaBrowser.Controller/Resolvers/BaseVideoResolver.cs b/MediaBrowser.Controller/Resolvers/BaseVideoResolver.cs index aadaf5423..06bee2ad1 100644 --- a/MediaBrowser.Controller/Resolvers/BaseVideoResolver.cs +++ b/MediaBrowser.Controller/Resolvers/BaseVideoResolver.cs @@ -35,19 +35,44 @@ namespace MediaBrowser.Controller.Resolvers // If the path is a file check for a matching extensions if (!args.IsDirectory) { - if (EntityResolutionHelper.IsVideoFile(args.Path)) + // http://wiki.xbmc.org/index.php?title=Media_stubs + var isPlaceHolder = EntityResolutionHelper.IsVideoPlaceHolder(args.Path); + + if (EntityResolutionHelper.IsVideoFile(args.Path) || isPlaceHolder) { var extension = Path.GetExtension(args.Path); var type = string.Equals(extension, ".iso", StringComparison.OrdinalIgnoreCase) || string.Equals(extension, ".img", StringComparison.OrdinalIgnoreCase) ? VideoType.Iso : VideoType.VideoFile; - return new TVideoType + var video = new TVideoType { VideoType = type, Path = args.Path, - IsInMixedFolder = true + IsInMixedFolder = true, + IsPlaceHolder = isPlaceHolder }; + + if (isPlaceHolder) + { + if (args.Path.EndsWith("dvd.disc", StringComparison.OrdinalIgnoreCase)) + { + video.VideoType = VideoType.Dvd; + } + else if (args.Path.EndsWith("hddvd.disc", StringComparison.OrdinalIgnoreCase)) + { + video.VideoType = VideoType.HdDvd; + } + else if (args.Path.EndsWith("bluray.disc", StringComparison.OrdinalIgnoreCase) || + args.Path.EndsWith("brrip.disc", StringComparison.OrdinalIgnoreCase) || + args.Path.EndsWith("bd25.disc", StringComparison.OrdinalIgnoreCase) || + args.Path.EndsWith("bd50.disc", StringComparison.OrdinalIgnoreCase)) + { + video.VideoType = VideoType.BluRay; + } + } + + return video; } } |
