update db queries

This commit is contained in:
Luke Pulverenti
2015-10-29 09:28:05 -04:00
parent a9e0797878
commit 0bd1f36ece
30 changed files with 432 additions and 245 deletions

View File

@@ -639,7 +639,7 @@ namespace MediaBrowser.Controller.Entities
/// </summary>
/// <value>The tags.</value>
public List<string> Tags { get; set; }
/// <summary>
/// Gets or sets the home page URL.
/// </summary>
@@ -1898,5 +1898,24 @@ namespace MediaBrowser.Controller.Entities
DateLastSaved.Ticks.ToString(CultureInfo.InvariantCulture)
};
}
public virtual IEnumerable<Guid> GetAncestorIds()
{
return Parents.Select(i => i.Id).Concat(LibraryManager.GetCollectionFolders(this).Select(i => i.Id));
}
[IgnoreDataMember]
public virtual bool SupportsAncestors
{
get
{
return true;
}
}
public virtual IEnumerable<Guid> GetIdsForAncestorQuery()
{
return new[] { Id };
}
}
}