mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
update search
This commit is contained in:
parent
e429b42146
commit
4e90d73203
@ -763,21 +763,24 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
/// <returns>IEnumerable{BaseItem}.</returns>
|
/// <returns>IEnumerable{BaseItem}.</returns>
|
||||||
protected IEnumerable<BaseItem> GetCachedChildren()
|
protected IEnumerable<BaseItem> GetCachedChildren()
|
||||||
{
|
{
|
||||||
var childrenItems = ItemRepository.GetChildrenItems(Id).Select(RetrieveChild).Where(i => i != null);
|
if (ConfigurationManager.Configuration.DisableStartupScan)
|
||||||
|
{
|
||||||
|
return ItemRepository.GetChildrenItems(Id).Select(RetrieveChild).Where(i => i != null);
|
||||||
|
//return ItemRepository.GetItems(new InternalItemsQuery
|
||||||
|
//{
|
||||||
|
// ParentId = Id
|
||||||
|
|
||||||
//var children = ItemRepository.GetChildren(Id).Select(RetrieveChild).Where(i => i != null).ToList();
|
//}).Items.Select(RetrieveChild).Where(i => i != null);
|
||||||
|
}
|
||||||
//if (children.Count != childrenItems.Count)
|
else
|
||||||
//{
|
{
|
||||||
// var b = this;
|
return ItemRepository.GetChildrenItems(Id).Select(RetrieveChild).Where(i => i != null);
|
||||||
//}
|
}
|
||||||
|
|
||||||
return childrenItems;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private BaseItem RetrieveChild(BaseItem child)
|
private BaseItem RetrieveChild(BaseItem child)
|
||||||
{
|
{
|
||||||
if (child.Id == Guid.Empty)
|
if (child == null || child.Id == Guid.Empty)
|
||||||
{
|
{
|
||||||
Logger.Error("Item found with empty Id: " + (child.Path ?? child.Name));
|
Logger.Error("Item found with empty Id: " + (child.Path ?? child.Name));
|
||||||
return null;
|
return null;
|
||||||
|
@ -101,6 +101,8 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
public bool? IsOffline { get; set; }
|
public bool? IsOffline { get; set; }
|
||||||
public LocationType? LocationType { get; set; }
|
public LocationType? LocationType { get; set; }
|
||||||
|
|
||||||
|
public Guid? ParentId { get; set; }
|
||||||
|
|
||||||
public InternalItemsQuery()
|
public InternalItemsQuery()
|
||||||
{
|
{
|
||||||
Tags = new string[] { };
|
Tags = new string[] { };
|
||||||
|
@ -354,6 +354,10 @@ namespace MediaBrowser.Server.Implementations.Library
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//if (!(item is Folder))
|
||||||
|
//{
|
||||||
|
// return;
|
||||||
|
//}
|
||||||
LibraryItemsCache.AddOrUpdate(id, item, delegate { return item; });
|
LibraryItemsCache.AddOrUpdate(id, item, delegate { return item; });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1202,6 +1202,12 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|||||||
whereClauses.Add(string.Format("ChannelId in ({0})", inClause));
|
whereClauses.Add(string.Format("ChannelId in ({0})", inClause));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (query.ParentId.HasValue)
|
||||||
|
{
|
||||||
|
whereClauses.Add("ParentId=@ParentId");
|
||||||
|
cmd.Parameters.Add(cmd, "@ParentId", DbType.Guid).Value = query.ParentId.Value;
|
||||||
|
}
|
||||||
|
|
||||||
if (query.MinEndDate.HasValue)
|
if (query.MinEndDate.HasValue)
|
||||||
{
|
{
|
||||||
whereClauses.Add("EndDate>=@MinEndDate");
|
whereClauses.Add("EndDate>=@MinEndDate");
|
||||||
|
@ -309,6 +309,9 @@
|
|||||||
<Content Include="dashboard-ui\scripts\searchmenu.js">
|
<Content Include="dashboard-ui\scripts\searchmenu.js">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
<Content Include="dashboard-ui\scripts\searchpage.js">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
<Content Include="dashboard-ui\scripts\secondaryitems.js">
|
<Content Include="dashboard-ui\scripts\secondaryitems.js">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
@ -330,6 +333,9 @@
|
|||||||
<Content Include="dashboard-ui\scripts\wizardlivetvtuner.js">
|
<Content Include="dashboard-ui\scripts\wizardlivetvtuner.js">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
<Content Include="dashboard-ui\search.html">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
<Content Include="dashboard-ui\secondaryitems.html">
|
<Content Include="dashboard-ui\secondaryitems.html">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user