updated theme song/video url's
This commit is contained in:
parent
58cc2248b9
commit
59d576ba09
|
@ -1,4 +1,5 @@
|
|||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Dto;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Entities.Audio;
|
||||
using MediaBrowser.Controller.Entities.Movies;
|
||||
using MediaBrowser.Controller.Entities.TV;
|
||||
|
@ -44,6 +45,50 @@ namespace MediaBrowser.Api
|
|||
public int? Limit { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Class GetThemeSongs
|
||||
/// </summary>
|
||||
[Route("/Items/{Id}/ThemeSongs", "GET")]
|
||||
[Api(Description = "Gets theme songs for an item")]
|
||||
public class GetThemeSongs : IReturn<ThemeSongsResult>
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the user id.
|
||||
/// </summary>
|
||||
/// <value>The user id.</value>
|
||||
[ApiMember(Name = "UserId", Description = "Optional. Filter by user id, and attach user data", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
|
||||
public Guid? UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the id.
|
||||
/// </summary>
|
||||
/// <value>The id.</value>
|
||||
[ApiMember(Name = "Id", Description = "Item Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")]
|
||||
public string Id { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Class GetThemeVideos
|
||||
/// </summary>
|
||||
[Route("/Items/{Id}/ThemeVideos", "GET")]
|
||||
[Api(Description = "Gets video backdrops for an item")]
|
||||
public class GetThemeVideos : IReturn<ThemeVideosResult>
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the user id.
|
||||
/// </summary>
|
||||
/// <value>The user id.</value>
|
||||
[ApiMember(Name = "UserId", Description = "Optional. Filter by user id, and attach user data", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
|
||||
public Guid? UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the id.
|
||||
/// </summary>
|
||||
/// <value>The id.</value>
|
||||
[ApiMember(Name = "Id", Description = "Item Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")]
|
||||
public string Id { get; set; }
|
||||
}
|
||||
|
||||
[Route("/Library/Refresh", "POST")]
|
||||
[Api(Description = "Starts a library scan")]
|
||||
public class RefreshLibrary : IReturnVoid
|
||||
|
@ -70,6 +115,7 @@ namespace MediaBrowser.Api
|
|||
|
||||
private readonly ILibraryManager _libraryManager;
|
||||
private readonly IUserManager _userManager;
|
||||
private readonly IUserDataRepository _userDataRepository;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LibraryService" /> class.
|
||||
|
@ -77,11 +123,12 @@ namespace MediaBrowser.Api
|
|||
/// <param name="itemRepo">The item repo.</param>
|
||||
/// <param name="libraryManager">The library manager.</param>
|
||||
/// <param name="userManager">The user manager.</param>
|
||||
public LibraryService(IItemRepository itemRepo, ILibraryManager libraryManager, IUserManager userManager)
|
||||
public LibraryService(IItemRepository itemRepo, ILibraryManager libraryManager, IUserManager userManager, IUserDataRepository userDataRepository)
|
||||
{
|
||||
_itemRepo = itemRepo;
|
||||
_libraryManager = libraryManager;
|
||||
_userManager = userManager;
|
||||
_userDataRepository = userDataRepository;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -169,5 +216,65 @@ namespace MediaBrowser.Api
|
|||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the specified request.
|
||||
/// </summary>
|
||||
/// <param name="request">The request.</param>
|
||||
/// <returns>System.Object.</returns>
|
||||
public object Get(GetThemeSongs request)
|
||||
{
|
||||
var user = request.UserId.HasValue ? _userManager.GetUserById(request.UserId.Value) : null;
|
||||
|
||||
var item = string.IsNullOrEmpty(request.Id) ?
|
||||
(request.UserId.HasValue ? user.RootFolder :
|
||||
(Folder)_libraryManager.RootFolder) : DtoBuilder.GetItemByClientId(request.Id, _userManager, _libraryManager, request.UserId);
|
||||
|
||||
// Get everything
|
||||
var fields = Enum.GetNames(typeof(ItemFields)).Select(i => (ItemFields)Enum.Parse(typeof(ItemFields), i, true)).ToList();
|
||||
|
||||
var dtoBuilder = new DtoBuilder(Logger, _libraryManager, _userDataRepository);
|
||||
|
||||
var items = _itemRepo.GetItems(item.ThemeSongIds).OrderBy(i => i.SortName).Select(i => dtoBuilder.GetBaseItemDto(i, fields, user)).Select(t => t.Result).ToArray();
|
||||
|
||||
var result = new ThemeSongsResult
|
||||
{
|
||||
Items = items,
|
||||
TotalRecordCount = items.Length,
|
||||
OwnerId = DtoBuilder.GetClientItemId(item)
|
||||
};
|
||||
|
||||
return ToOptimizedResult(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the specified request.
|
||||
/// </summary>
|
||||
/// <param name="request">The request.</param>
|
||||
/// <returns>System.Object.</returns>
|
||||
public object Get(GetThemeVideos request)
|
||||
{
|
||||
var user = request.UserId.HasValue ? _userManager.GetUserById(request.UserId.Value) : null;
|
||||
|
||||
var item = string.IsNullOrEmpty(request.Id) ?
|
||||
(request.UserId.HasValue ? user.RootFolder :
|
||||
(Folder)_libraryManager.RootFolder) : DtoBuilder.GetItemByClientId(request.Id, _userManager, _libraryManager, request.UserId);
|
||||
|
||||
// Get everything
|
||||
var fields = Enum.GetNames(typeof(ItemFields)).Select(i => (ItemFields)Enum.Parse(typeof(ItemFields), i, true)).ToList();
|
||||
|
||||
var dtoBuilder = new DtoBuilder(Logger, _libraryManager, _userDataRepository);
|
||||
|
||||
var items = _itemRepo.GetItems(item.ThemeVideoIds).OrderBy(i => i.SortName).Select(i => dtoBuilder.GetBaseItemDto(i, fields, user)).Select(t => t.Result).ToArray();
|
||||
|
||||
var result = new ThemeVideosResult
|
||||
{
|
||||
Items = items,
|
||||
TotalRecordCount = items.Length,
|
||||
OwnerId = DtoBuilder.GetClientItemId(item)
|
||||
};
|
||||
|
||||
return ToOptimizedResult(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -218,8 +218,8 @@ namespace MediaBrowser.Api
|
|||
private Task<BaseItemDto[]> GetItemDtos(IEnumerable<BaseItem> pagedItems, User user, List<ItemFields> fields)
|
||||
{
|
||||
var dtoBuilder = new DtoBuilder(Logger, _libraryManager, _userDataRepository);
|
||||
|
||||
return Task.WhenAll(pagedItems.Select(i => dtoBuilder.GetBaseItemDto(i, user, fields)));
|
||||
|
||||
return Task.WhenAll(pagedItems.Select(i => dtoBuilder.GetBaseItemDto(i, fields, user)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -114,7 +114,7 @@ namespace MediaBrowser.Api.UserLibrary
|
|||
{
|
||||
var user = UserManager.GetUserById(request.UserId.Value);
|
||||
|
||||
return await builder.GetBaseItemDto(item, user, fields.ToList()).ConfigureAwait(false);
|
||||
return await builder.GetBaseItemDto(item, fields.ToList(), user).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
return await builder.GetBaseItemDto(item, fields.ToList()).ConfigureAwait(false);
|
||||
|
|
|
@ -261,7 +261,7 @@ namespace MediaBrowser.Api.UserLibrary
|
|||
}
|
||||
|
||||
var dto = user == null ? await new DtoBuilder(Logger, LibraryManager, UserDataRepository).GetBaseItemDto(item, fields).ConfigureAwait(false) :
|
||||
await new DtoBuilder(Logger, LibraryManager, UserDataRepository).GetBaseItemDto(item, user, fields).ConfigureAwait(false);
|
||||
await new DtoBuilder(Logger, LibraryManager, UserDataRepository).GetBaseItemDto(item, fields, user).ConfigureAwait(false);
|
||||
|
||||
if (fields.Contains(ItemFields.ItemCounts))
|
||||
{
|
||||
|
|
|
@ -105,7 +105,7 @@ namespace MediaBrowser.Api.UserLibrary
|
|||
{
|
||||
var user = UserManager.GetUserById(request.UserId.Value);
|
||||
|
||||
return await builder.GetBaseItemDto(item, user, fields.ToList()).ConfigureAwait(false);
|
||||
return await builder.GetBaseItemDto(item, fields.ToList(), user).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
return await builder.GetBaseItemDto(item, fields.ToList()).ConfigureAwait(false);
|
||||
|
|
|
@ -260,7 +260,7 @@ namespace MediaBrowser.Api.UserLibrary
|
|||
|
||||
var dtoBuilder = new DtoBuilder(Logger, _libraryManager, _userDataRepository);
|
||||
|
||||
var returnItems = await Task.WhenAll(pagedItems.Select(i => dtoBuilder.GetBaseItemDto(i, user, fields))).ConfigureAwait(false);
|
||||
var returnItems = await Task.WhenAll(pagedItems.Select(i => dtoBuilder.GetBaseItemDto(i, fields, user))).ConfigureAwait(false);
|
||||
|
||||
return new ItemsResult
|
||||
{
|
||||
|
|
|
@ -120,7 +120,7 @@ namespace MediaBrowser.Api.UserLibrary
|
|||
{
|
||||
var user = UserManager.GetUserById(request.UserId.Value);
|
||||
|
||||
return await builder.GetBaseItemDto(item, user, fields.ToList()).ConfigureAwait(false);
|
||||
return await builder.GetBaseItemDto(item, fields.ToList(), user).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
return await builder.GetBaseItemDto(item, fields.ToList()).ConfigureAwait(false);
|
||||
|
|
|
@ -105,7 +105,7 @@ namespace MediaBrowser.Api.UserLibrary
|
|||
{
|
||||
var user = UserManager.GetUserById(request.UserId.Value);
|
||||
|
||||
return await builder.GetBaseItemDto(item, user, fields.ToList()).ConfigureAwait(false);
|
||||
return await builder.GetBaseItemDto(item, fields.ToList(), user).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
return await builder.GetBaseItemDto(item, fields.ToList()).ConfigureAwait(false);
|
||||
|
|
|
@ -318,50 +318,6 @@ namespace MediaBrowser.Api.UserLibrary
|
|||
public string Id { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Class GetThemeSongs
|
||||
/// </summary>
|
||||
[Route("/Users/{UserId}/Items/{Id}/ThemeSongs", "GET")]
|
||||
[Api(Description = "Gets theme songs for an item")]
|
||||
public class GetThemeSongs : IReturn<ThemeSongsResult>
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the user id.
|
||||
/// </summary>
|
||||
/// <value>The user id.</value>
|
||||
[ApiMember(Name = "UserId", Description = "User Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")]
|
||||
public Guid UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the id.
|
||||
/// </summary>
|
||||
/// <value>The id.</value>
|
||||
[ApiMember(Name = "Id", Description = "Item Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")]
|
||||
public string Id { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Class GetThemeVideos
|
||||
/// </summary>
|
||||
[Route("/Users/{UserId}/Items/{Id}/ThemeVideos", "GET")]
|
||||
[Api(Description = "Gets video backdrops for an item")]
|
||||
public class GetThemeVideos : IReturn<ThemeVideosResult>
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the user id.
|
||||
/// </summary>
|
||||
/// <value>The user id.</value>
|
||||
[ApiMember(Name = "UserId", Description = "User Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")]
|
||||
public Guid UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the id.
|
||||
/// </summary>
|
||||
/// <value>The id.</value>
|
||||
[ApiMember(Name = "Id", Description = "Item Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")]
|
||||
public string Id { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Class GetSpecialFeatures
|
||||
/// </summary>
|
||||
|
@ -443,7 +399,7 @@ namespace MediaBrowser.Api.UserLibrary
|
|||
|
||||
var dtoBuilder = new DtoBuilder(Logger, _libraryManager, _userDataRepository);
|
||||
|
||||
var items = _itemRepo.GetItems(movie.SpecialFeatureIds).OrderBy(i => i.SortName).Select(i => dtoBuilder.GetBaseItemDto(i, user, fields)).Select(t => t.Result).ToList();
|
||||
var items = _itemRepo.GetItems(movie.SpecialFeatureIds).OrderBy(i => i.SortName).Select(i => dtoBuilder.GetBaseItemDto(i, fields, user)).Select(t => t.Result).ToList();
|
||||
|
||||
return ToOptimizedResult(items);
|
||||
}
|
||||
|
@ -464,67 +420,11 @@ namespace MediaBrowser.Api.UserLibrary
|
|||
|
||||
var dtoBuilder = new DtoBuilder(Logger, _libraryManager, _userDataRepository);
|
||||
|
||||
var items = _itemRepo.GetItems(item.LocalTrailerIds).OrderBy(i => i.SortName).Select(i => dtoBuilder.GetBaseItemDto(i, user, fields)).Select(t => t.Result).ToList();
|
||||
var items = _itemRepo.GetItems(item.LocalTrailerIds).OrderBy(i => i.SortName).Select(i => dtoBuilder.GetBaseItemDto(i, fields, user)).Select(t => t.Result).ToList();
|
||||
|
||||
return ToOptimizedResult(items);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the specified request.
|
||||
/// </summary>
|
||||
/// <param name="request">The request.</param>
|
||||
/// <returns>System.Object.</returns>
|
||||
public object Get(GetThemeSongs request)
|
||||
{
|
||||
var user = _userManager.GetUserById(request.UserId);
|
||||
|
||||
var item = string.IsNullOrEmpty(request.Id) ? user.RootFolder : DtoBuilder.GetItemByClientId(request.Id, _userManager, _libraryManager, user.Id);
|
||||
|
||||
// Get everything
|
||||
var fields = Enum.GetNames(typeof(ItemFields)).Select(i => (ItemFields)Enum.Parse(typeof(ItemFields), i, true)).ToList();
|
||||
|
||||
var dtoBuilder = new DtoBuilder(Logger, _libraryManager, _userDataRepository);
|
||||
|
||||
var items = _itemRepo.GetItems(item.ThemeSongIds).OrderBy(i => i.SortName).Select(i => dtoBuilder.GetBaseItemDto(i, user, fields)).Select(t => t.Result).ToArray();
|
||||
|
||||
var result = new ThemeSongsResult
|
||||
{
|
||||
Items = items,
|
||||
TotalRecordCount = items.Length,
|
||||
OwnerId = DtoBuilder.GetClientItemId(item)
|
||||
};
|
||||
|
||||
return ToOptimizedResult(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the specified request.
|
||||
/// </summary>
|
||||
/// <param name="request">The request.</param>
|
||||
/// <returns>System.Object.</returns>
|
||||
public object Get(GetThemeVideos request)
|
||||
{
|
||||
var user = _userManager.GetUserById(request.UserId);
|
||||
|
||||
var item = string.IsNullOrEmpty(request.Id) ? user.RootFolder : DtoBuilder.GetItemByClientId(request.Id, _userManager, _libraryManager, user.Id);
|
||||
|
||||
// Get everything
|
||||
var fields = Enum.GetNames(typeof(ItemFields)).Select(i => (ItemFields)Enum.Parse(typeof(ItemFields), i, true)).ToList();
|
||||
|
||||
var dtoBuilder = new DtoBuilder(Logger, _libraryManager, _userDataRepository);
|
||||
|
||||
var items = _itemRepo.GetItems(item.ThemeVideoIds).OrderBy(i => i.SortName).Select(i => dtoBuilder.GetBaseItemDto(i, user, fields)).Select(t => t.Result).ToArray();
|
||||
|
||||
var result = new ThemeVideosResult
|
||||
{
|
||||
Items = items,
|
||||
TotalRecordCount = items.Length,
|
||||
OwnerId = DtoBuilder.GetClientItemId(item)
|
||||
};
|
||||
|
||||
return ToOptimizedResult(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the specified request.
|
||||
/// </summary>
|
||||
|
@ -541,7 +441,7 @@ namespace MediaBrowser.Api.UserLibrary
|
|||
|
||||
var dtoBuilder = new DtoBuilder(Logger, _libraryManager, _userDataRepository);
|
||||
|
||||
var result = dtoBuilder.GetBaseItemDto(item, user, fields).Result;
|
||||
var result = dtoBuilder.GetBaseItemDto(item, fields, user).Result;
|
||||
|
||||
return ToOptimizedResult(result);
|
||||
}
|
||||
|
@ -562,7 +462,7 @@ namespace MediaBrowser.Api.UserLibrary
|
|||
|
||||
var dtoBuilder = new DtoBuilder(Logger, _libraryManager, _userDataRepository);
|
||||
|
||||
var result = dtoBuilder.GetBaseItemDto(item, user, fields).Result;
|
||||
var result = dtoBuilder.GetBaseItemDto(item, fields, user).Result;
|
||||
|
||||
return ToOptimizedResult(result);
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ namespace MediaBrowser.Api.UserLibrary
|
|||
{
|
||||
var user = UserManager.GetUserById(request.UserId.Value);
|
||||
|
||||
return await builder.GetBaseItemDto(item, user, fields.ToList()).ConfigureAwait(false);
|
||||
return await builder.GetBaseItemDto(item, fields.ToList(), user).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
return await builder.GetBaseItemDto(item, fields.ToList()).ConfigureAwait(false);
|
||||
|
|
|
@ -39,80 +39,21 @@ namespace MediaBrowser.Controller.Dto
|
|||
_userDataRepository = userDataRepository;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the dto base item.
|
||||
/// </summary>
|
||||
/// <param name="item">The item.</param>
|
||||
/// <param name="fields">The fields.</param>
|
||||
/// <returns>Task{DtoBaseItem}.</returns>
|
||||
/// <exception cref="System.ArgumentNullException">item</exception>
|
||||
public async Task<BaseItemDto> GetBaseItemDto(BaseItem item, List<ItemFields> fields)
|
||||
{
|
||||
if (item == null)
|
||||
{
|
||||
throw new ArgumentNullException("item");
|
||||
}
|
||||
if (fields == null)
|
||||
{
|
||||
throw new ArgumentNullException("fields");
|
||||
}
|
||||
|
||||
var dto = new BaseItemDto();
|
||||
|
||||
var tasks = new List<Task>();
|
||||
|
||||
if (fields.Contains(ItemFields.Studios))
|
||||
{
|
||||
tasks.Add(AttachStudios(dto, item));
|
||||
}
|
||||
|
||||
if (fields.Contains(ItemFields.People))
|
||||
{
|
||||
tasks.Add(AttachPeople(dto, item));
|
||||
}
|
||||
|
||||
if (fields.Contains(ItemFields.PrimaryImageAspectRatio))
|
||||
{
|
||||
try
|
||||
{
|
||||
await AttachPrimaryImageAspectRatio(dto, item, _logger).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// Have to use a catch-all unfortunately because some .net image methods throw plain Exceptions
|
||||
_logger.ErrorException("Error generating PrimaryImageAspectRatio for {0}", ex, item.Name);
|
||||
}
|
||||
}
|
||||
|
||||
AttachBasicFields(dto, item, fields);
|
||||
|
||||
// Make sure all the tasks we kicked off have completed.
|
||||
if (tasks.Count > 0)
|
||||
{
|
||||
await Task.WhenAll(tasks).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
return dto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts a BaseItem to a DTOBaseItem
|
||||
/// </summary>
|
||||
/// <param name="item">The item.</param>
|
||||
/// <param name="user">The user.</param>
|
||||
/// <param name="fields">The fields.</param>
|
||||
/// <param name="user">The user.</param>
|
||||
/// <returns>Task{DtoBaseItem}.</returns>
|
||||
/// <exception cref="System.ArgumentNullException">item</exception>
|
||||
public async Task<BaseItemDto> GetBaseItemDto(BaseItem item, User user, List<ItemFields> fields)
|
||||
public async Task<BaseItemDto> GetBaseItemDto(BaseItem item, List<ItemFields> fields, User user = null)
|
||||
{
|
||||
if (item == null)
|
||||
{
|
||||
throw new ArgumentNullException("item");
|
||||
}
|
||||
if (user == null)
|
||||
{
|
||||
throw new ArgumentNullException("user");
|
||||
}
|
||||
|
||||
if (fields == null)
|
||||
{
|
||||
throw new ArgumentNullException("fields");
|
||||
|
@ -132,7 +73,10 @@ namespace MediaBrowser.Controller.Dto
|
|||
tasks.Add(AttachPeople(dto, item));
|
||||
}
|
||||
|
||||
tasks.Add(AttachUserSpecificInfo(dto, item, user, fields));
|
||||
if (user != null)
|
||||
{
|
||||
tasks.Add(AttachUserSpecificInfo(dto, item, user, fields));
|
||||
}
|
||||
|
||||
if (fields.Contains(ItemFields.PrimaryImageAspectRatio))
|
||||
{
|
||||
|
|
|
@ -1883,14 +1883,17 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
|
|||
*/
|
||||
self.getThemeSongs = function (userId, itemId) {
|
||||
|
||||
if (!userId) {
|
||||
throw new Error("null userId");
|
||||
}
|
||||
if (!itemId) {
|
||||
throw new Error("null itemId");
|
||||
}
|
||||
|
||||
var url = self.getUrl("Users/" + userId + "/Items/" + itemId + "/ThemeSongs");
|
||||
var options = {};
|
||||
|
||||
if (userId) {
|
||||
options.userId = userId;
|
||||
}
|
||||
|
||||
var url = self.getUrl("Items/" + itemId + "/ThemeSongs", options);
|
||||
|
||||
return self.ajax({
|
||||
type: "GET",
|
||||
|
@ -1901,14 +1904,17 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
|
|||
|
||||
self.getThemeVideos = function (userId, itemId) {
|
||||
|
||||
if (!userId) {
|
||||
throw new Error("null userId");
|
||||
}
|
||||
if (!itemId) {
|
||||
throw new Error("null itemId");
|
||||
}
|
||||
|
||||
var url = self.getUrl("Users/" + userId + "/Items/" + itemId + "/ThemeVideos");
|
||||
var options = {};
|
||||
|
||||
if (userId) {
|
||||
options.userId = userId;
|
||||
}
|
||||
|
||||
var url = self.getUrl("Items/" + itemId + "/ThemeVideos", options);
|
||||
|
||||
return self.ajax({
|
||||
type: "GET",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.111" targetFramework="net45" />
|
||||
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.112" targetFramework="net45" />
|
||||
<package id="ServiceStack.Common" version="3.9.45" targetFramework="net45" />
|
||||
<package id="ServiceStack.Text" version="3.9.45" targetFramework="net45" />
|
||||
</packages>
|
Loading…
Reference in New Issue
Block a user