All calls to get items now require passing in a userId. Made the model project portable. Also filled in more api calls.

This commit is contained in:
LukePulverenti Luke Pulverenti luke pulverenti
2012-07-16 12:50:44 -04:00
parent baedafbeb9
commit 6fbd5cf464
46 changed files with 986 additions and 410 deletions

View File

@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MediaBrowser.Model.Entities
{
public class Audio : BaseItem

View File

@@ -51,6 +51,7 @@ namespace MediaBrowser.Model.Entities
public virtual string AspectRatio { get; set; }
public virtual int? ProductionYear { get; set; }
[IgnoreDataMember]
public virtual IEnumerable<Video> LocalTrailers { get; set; }
public virtual string TrailerUrl { get; set; }
@@ -60,17 +61,6 @@ namespace MediaBrowser.Model.Entities
return Name;
}
/// <summary>
/// This is strictly to enhance json output, until I can find a way to customize service stack to add this without having to use a property
/// </summary>
public virtual bool IsFolder
{
get
{
return false;
}
}
/// <summary>
/// This is strictly to enhance json output, until I can find a way to customize service stack to add this without having to use a property
/// </summary>

View File

@@ -0,0 +1,21 @@

namespace MediaBrowser.Model.Entities
{
/// <summary>
/// This is a stub class used by the api to get IBN types in a compact format
/// </summary>
public class CategoryInfo
{
/// <summary>
/// The name of the genre, year, studio, etc
/// </summary>
public string Name { get; set; }
public string PrimaryImagePath { get; set; }
/// <summary>
/// The number of items that have the genre, year, studio, etc
/// </summary>
public int ItemCount { get; set; }
}
}

View File

@@ -18,25 +18,12 @@ namespace MediaBrowser.Model.Entities
}
}
public override bool IsFolder
{
get
{
return true;
}
}
[IgnoreDataMember]
public BaseItem[] Children { get; set; }
[IgnoreDataMember]
public IEnumerable<Folder> FolderChildren { get { return Children.OfType<Folder>(); } }
public Folder GetFolderByName(string name)
{
return FolderChildren.FirstOrDefault(f => System.IO.Path.GetFileName(f.Path).Equals(name, StringComparison.OrdinalIgnoreCase));
}
/// <summary>
/// Finds an item by ID, recursively
/// </summary>

View File

@@ -0,0 +1,7 @@

namespace MediaBrowser.Model.Entities
{
public class Genre : BaseItem
{
}
}

View File

@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MediaBrowser.Model.Entities
{
/// <summary>
@@ -26,8 +21,9 @@ namespace MediaBrowser.Model.Entities
public enum PersonType
{
Actor = 1,
Director = 2,
Writer = 3
Actor,
Director,
Writer,
Producer
}
}

View File

@@ -1,12 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MediaBrowser.Model.Entities
{
public class PlaybackStatus
{
}
}

View File

@@ -0,0 +1,7 @@

namespace MediaBrowser.Model.Entities
{
public class Studio : BaseItem
{
}
}

View File

@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Generic;
namespace MediaBrowser.Model.Entities
{
@@ -35,8 +31,8 @@ namespace MediaBrowser.Model.Entities
public enum VideoType
{
VideoFile = 1,
DVD = 2,
BluRay = 3
VideoFile,
DVD,
BluRay
}
}

View File

@@ -0,0 +1,7 @@

namespace MediaBrowser.Model.Entities
{
public class Year : BaseItem
{
}
}