update task buttons

This commit is contained in:
Luke Pulverenti
2015-01-22 11:41:34 -05:00
parent 7bc370bdc7
commit b7e5e21c97
22 changed files with 86 additions and 324 deletions

View File

@@ -396,8 +396,7 @@ namespace MediaBrowser.Api.Images
public object Get(GetItemByNameImage request)
{
var pathInfo = PathInfo.Parse(Request.PathInfo);
var type = pathInfo.GetArgumentValue<string>(0);
var type = GetPathValue(0);
var item = GetItemByName(request.Name, type, _libraryManager);
@@ -406,8 +405,7 @@ namespace MediaBrowser.Api.Images
public object Head(GetItemByNameImage request)
{
var pathInfo = PathInfo.Parse(Request.PathInfo);
var type = pathInfo.GetArgumentValue<string>(0);
var type = GetPathValue(0);
var item = GetItemByName(request.Name, type, _libraryManager);
@@ -420,10 +418,9 @@ namespace MediaBrowser.Api.Images
/// <param name="request">The request.</param>
public void Post(PostUserImage request)
{
var pathInfo = PathInfo.Parse(Request.PathInfo);
var id = new Guid(pathInfo.GetArgumentValue<string>(1));
var id = new Guid(GetPathValue(1));
request.Type = (ImageType)Enum.Parse(typeof(ImageType), pathInfo.GetArgumentValue<string>(3), true);
request.Type = (ImageType)Enum.Parse(typeof(ImageType), GetPathValue(3), true);
var item = _userManager.GetUserById(id);
@@ -438,10 +435,9 @@ namespace MediaBrowser.Api.Images
/// <param name="request">The request.</param>
public void Post(PostItemImage request)
{
var pathInfo = PathInfo.Parse(Request.PathInfo);
var id = new Guid(pathInfo.GetArgumentValue<string>(1));
var id = new Guid(GetPathValue(1));
request.Type = (ImageType)Enum.Parse(typeof(ImageType), pathInfo.GetArgumentValue<string>(3), true);
request.Type = (ImageType)Enum.Parse(typeof(ImageType), GetPathValue(3), true);
var item = _libraryManager.GetItemById(id);