From 6807b2dd71d8a7ece0c1809449fffa78d4d62d3a Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 20 Mar 2016 14:39:20 -0400 Subject: [PATCH] update playlist querying --- MediaBrowser.Controller/Entities/Folder.cs | 7 +++++-- .../Persistence/SqliteItemRepository.cs | 5 +++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs index 3d4e90671..efb784153 100644 --- a/MediaBrowser.Controller/Entities/Folder.cs +++ b/MediaBrowser.Controller/Entities/Folder.cs @@ -830,8 +830,11 @@ namespace MediaBrowser.Controller.Entities { if (LinkedChildren.Count > 0) { - Logger.Debug("Query requires post-filtering due to LinkedChildren"); - return true; + if (!(this is ICollectionFolder)) + { + Logger.Debug("Query requires post-filtering due to LinkedChildren"); + return true; + } } if (query.SortBy != null && query.SortBy.Length > 0) diff --git a/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs b/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs index 1eaff1a6a..491f2c116 100644 --- a/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs +++ b/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs @@ -19,6 +19,7 @@ using System.Runtime.Serialization; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Controller.Channels; +using MediaBrowser.Controller.Playlists; using MediaBrowser.Model.LiveTv; namespace MediaBrowser.Server.Implementations.Persistence @@ -729,10 +730,12 @@ namespace MediaBrowser.Server.Implementations.Persistence var topParent = item.GetTopParent(); if (topParent != null) { + //Logger.Debug("Item {0} has top parent {1}", item.Id, topParent.Id); _saveItemCommand.GetParameter(index++).Value = topParent.Id.ToString("N"); } else { + //Logger.Debug("Item {0} has null top parent", item.Id); _saveItemCommand.GetParameter(index++).Value = null; } @@ -2199,6 +2202,8 @@ namespace MediaBrowser.Server.Implementations.Persistence typeof(MusicGenre), typeof(MusicVideo), typeof(Movie), + typeof(Playlist), + typeof(AudioPodcast), typeof(Trailer), typeof(BoxSet), typeof(Episode),