diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-03-03 02:03:17 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-03-03 02:03:17 -0500 |
| commit | 2fc0686c308e74654f4f7ef9ea6cf56fb61b5ff5 (patch) | |
| tree | afd595af2f85888544f437b2a367e241ade607dc /MediaBrowser.Controller/Entities/Video.cs | |
| parent | 12ba57d4232eb1c38af8a47dbc0fad90ad8941cb (diff) | |
add date content added comparer
Diffstat (limited to 'MediaBrowser.Controller/Entities/Video.cs')
| -rw-r--r-- | MediaBrowser.Controller/Entities/Video.cs | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/MediaBrowser.Controller/Entities/Video.cs b/MediaBrowser.Controller/Entities/Video.cs index d4507bc33..a0c3a6cf9 100644 --- a/MediaBrowser.Controller/Entities/Video.cs +++ b/MediaBrowser.Controller/Entities/Video.cs @@ -420,12 +420,17 @@ namespace MediaBrowser.Controller.Entities return base.GetDeletePaths(); } - public virtual IEnumerable<MediaStream> GetMediaStreams() + public IEnumerable<MediaStream> GetMediaStreams() { - return MediaSourceManager.GetMediaStreams(new MediaStreamQuery + var mediaSource = GetMediaSources(false) + .FirstOrDefault(); + + if (mediaSource == null) { - ItemId = Id - }); + return new List<MediaStream>(); + } + + return mediaSource.MediaStreams; } public virtual MediaStream GetDefaultVideoStream() @@ -474,7 +479,7 @@ namespace MediaBrowser.Controller.Entities private static MediaSourceInfo GetVersionInfo(bool enablePathSubstitution, Video i, MediaSourceType type) { - var mediaStreams = MediaSourceManager.GetMediaStreams(new MediaStreamQuery { ItemId = i.Id }) + var mediaStreams = MediaSourceManager.GetMediaStreams(i.Id) .ToList(); var locationType = i.LocationType; |
