Addede VfType to DtoBaseItem

This commit is contained in:
LukePulverenti Luke Pulverenti luke pulverenti 2012-08-24 13:49:07 -04:00
parent cc25bd579b
commit 0ff432ea4e
4 changed files with 18 additions and 4 deletions

View File

@ -107,6 +107,13 @@ namespace MediaBrowser.Api
dto.Type = item.GetType().Name;
dto.UserRating = item.UserRating;
VirtualFolder virtualFolder = item.VirtualFolder;
if (virtualFolder != null)
{
dto.VfType = virtualFolder.CollectionType;
}
dto.UserData = item.GetUserData(user);
Folder folder = item as Folder;

View File

@ -243,12 +243,14 @@ namespace MediaBrowser.Controller
{
var provider = MetadataProviders[i];
if (!provider.Supports(item))
// Skip if internet providers are currently disabled
if (provider.RequiresInternet && (!Configuration.EnableInternetProviders || !allowInternetProviders))
{
continue;
}
if (provider.RequiresInternet && (!Configuration.EnableInternetProviders || !allowInternetProviders))
// Skip if the provider doesn't support the current item
if (!provider.Supports(item))
{
continue;
}

View File

@ -83,6 +83,11 @@ namespace MediaBrowser.Model.DTO
public IEnumerable<DTOBaseItem> LocalTrailers { get; set; }
public int LocalTrailerCount { get; set; }
/// <summary>
/// Holds the virtual folder collection type
/// </summary>
public string VfType { get; set; }
/// <summary>
/// User data for this item based on the user it's being requested for
/// </summary>

View File

@ -27,7 +27,7 @@ namespace MediaBrowser.Model.DTO
}
/// <summary>
/// This is used by BaseItemContainer
/// This is used by the api to get information about a Person within a BaseItem
/// </summary>
public class BaseItemPerson
{
@ -38,7 +38,7 @@ namespace MediaBrowser.Model.DTO
}
/// <summary>
/// This is used by BaseItemContainer
/// This is used by the api to get information about a studio within a BaseItem
/// </summary>
public class BaseItemStudio
{