diff options
| author | Eric Reed <ebr@mediabrowser3.com> | 2013-06-18 15:28:18 -0400 |
|---|---|---|
| committer | Eric Reed <ebr@mediabrowser3.com> | 2013-06-18 15:28:18 -0400 |
| commit | cc728d87c2507d5392686df6e18c7ad2ba5c45bd (patch) | |
| tree | 1eee3719a4cd8abd78f422900620e62042161766 /MediaBrowser.Controller/Entities/Video.cs | |
| parent | 90155278f8b4465a4b5eaf140c5e6e4905cc8dcf (diff) | |
| parent | 5d8ed2c16fdeaec1344964778e98cadfaa9571b4 (diff) | |
Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
Diffstat (limited to 'MediaBrowser.Controller/Entities/Video.cs')
| -rw-r--r-- | MediaBrowser.Controller/Entities/Video.cs | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/MediaBrowser.Controller/Entities/Video.cs b/MediaBrowser.Controller/Entities/Video.cs index ad4cb2d09d..ec7b712096 100644 --- a/MediaBrowser.Controller/Entities/Video.cs +++ b/MediaBrowser.Controller/Entities/Video.cs @@ -1,8 +1,7 @@ -using System.Collections; -using MediaBrowser.Controller.Library; -using MediaBrowser.Controller.Resolvers; +using MediaBrowser.Controller.Resolvers; using MediaBrowser.Model.Entities; using System; +using System.Collections; using System.Collections.Generic; using System.IO; using System.Linq; @@ -24,7 +23,6 @@ namespace MediaBrowser.Controller.Entities public Video() { MediaStreams = new List<MediaStream>(); - Chapters = new List<ChapterInfo>(); PlayableStreamFileNames = new List<string>(); AdditionalPartIds = new List<Guid>(); } @@ -54,12 +52,6 @@ namespace MediaBrowser.Controller.Entities public List<MediaStream> MediaStreams { get; set; } /// <summary> - /// Gets or sets the chapters. - /// </summary> - /// <value>The chapters.</value> - public List<ChapterInfo> Chapters { get; set; } - - /// <summary> /// If the video is a folder-rip, this will hold the file list for the largest playlist /// </summary> public List<string> PlayableStreamFileNames { get; set; } @@ -139,7 +131,10 @@ namespace MediaBrowser.Controller.Entities var additionalPartsChanged = false; - if (IsMultiPart && LocationType == LocationType.FileSystem) + // Must have a parent to have additional parts + // In other words, it must be part of the Parent/Child tree + // The additional parts won't have additional parts themselves + if (IsMultiPart && LocationType == LocationType.FileSystem && Parent != null) { try { @@ -164,11 +159,6 @@ namespace MediaBrowser.Controller.Entities /// <returns>Task{System.Boolean}.</returns> private async Task<bool> RefreshAdditionalParts(CancellationToken cancellationToken, bool forceSave = false, bool forceRefresh = false, bool allowSlowProviders = true) { - if (!IsMultiPart || LocationType != LocationType.FileSystem) - { - return false; - } - var newItems = LoadAdditionalParts().ToList(); var newItemIds = newItems.Select(i => i.Id).ToList(); @@ -214,7 +204,7 @@ namespace MediaBrowser.Controller.Entities return LibraryManager.ResolvePaths<Video>(files, null).Select(video => { // Try to retrieve it from the db. If we don't find it, use the resolved version - var dbItem = LibraryManager.RetrieveItem(video.Id) as Video; + var dbItem = LibraryManager.RetrieveItem(video.Id, typeof(Video)) as Video; if (dbItem != null) { |
