aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities/Video.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/Entities/Video.cs')
-rw-r--r--MediaBrowser.Controller/Entities/Video.cs24
1 files changed, 7 insertions, 17 deletions
diff --git a/MediaBrowser.Controller/Entities/Video.cs b/MediaBrowser.Controller/Entities/Video.cs
index ad4cb2d09..ec7b71209 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)
{