diff options
| author | Luke <luke.pulverenti@gmail.com> | 2017-05-31 15:40:34 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-05-31 15:40:34 -0400 |
| commit | 91176d9ccc1dde8155c10411c70e62a9f4b059d5 (patch) | |
| tree | 21365f5a8dd09534a53d9f88d2a7a3116f3f3f98 /MediaBrowser.Controller/Entities/Video.cs | |
| parent | c37c9a75073b1b9caa3af2c3bc62abd837bd630e (diff) | |
| parent | 4e10daf646e0788409f2bc52ef70effa2616e3f3 (diff) | |
Merge pull request #2677 from MediaBrowser/beta
Beta
Diffstat (limited to 'MediaBrowser.Controller/Entities/Video.cs')
| -rw-r--r-- | MediaBrowser.Controller/Entities/Video.cs | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/MediaBrowser.Controller/Entities/Video.cs b/MediaBrowser.Controller/Entities/Video.cs index 90aa3690a..fb31d9a47 100644 --- a/MediaBrowser.Controller/Entities/Video.cs +++ b/MediaBrowser.Controller/Entities/Video.cs @@ -11,7 +11,7 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Common.Extensions; -using MediaBrowser.Common.IO; + using MediaBrowser.Controller.Channels; using MediaBrowser.Controller.IO; using MediaBrowser.Model.IO; @@ -282,12 +282,10 @@ namespace MediaBrowser.Controller.Entities public IEnumerable<Video> GetLinkedAlternateVersions() { - var linkedVersions = LinkedAlternateVersions + return LinkedAlternateVersions .Select(GetLinkedChild) .Where(i => i != null) - .OfType<Video>(); - - return linkedVersions + .OfType<Video>() .OrderBy(i => i.SortName); } @@ -554,7 +552,7 @@ namespace MediaBrowser.Controller.Entities if (SourceType == SourceType.Channel) { var sources = ChannelManager.GetStaticMediaSources(this, CancellationToken.None) - .Result.ToList(); + .ToList(); if (sources.Count > 0) { @@ -630,21 +628,24 @@ namespace MediaBrowser.Controller.Entities { info.Path = media.ShortcutPath; - if (info.Path.StartsWith("Http", StringComparison.OrdinalIgnoreCase)) - { - info.Protocol = MediaProtocol.Http; - } - else if (info.Path.StartsWith("Rtmp", StringComparison.OrdinalIgnoreCase)) - { - info.Protocol = MediaProtocol.Rtmp; - } - else if (info.Path.StartsWith("Rtsp", StringComparison.OrdinalIgnoreCase)) - { - info.Protocol = MediaProtocol.Rtsp; - } - else + if (!string.IsNullOrWhiteSpace(info.Path)) { - info.Protocol = MediaProtocol.File; + if (info.Path.StartsWith("Http", StringComparison.OrdinalIgnoreCase)) + { + info.Protocol = MediaProtocol.Http; + } + else if (info.Path.StartsWith("Rtmp", StringComparison.OrdinalIgnoreCase)) + { + info.Protocol = MediaProtocol.Rtmp; + } + else if (info.Path.StartsWith("Rtsp", StringComparison.OrdinalIgnoreCase)) + { + info.Protocol = MediaProtocol.Rtsp; + } + else + { + info.Protocol = MediaProtocol.File; + } } } |
