added new item by name filters
This commit is contained in:
parent
3cde201190
commit
f4b890f163
|
@ -14,14 +14,6 @@ using System.Threading.Tasks;
|
|||
|
||||
namespace MediaBrowser.Api
|
||||
{
|
||||
[Route("/LiveTv/Channels/{ChannelId}", "POST")]
|
||||
[Api(("Updates an item"))]
|
||||
public class UpdateChannel : BaseItemDto, IReturnVoid
|
||||
{
|
||||
[ApiMember(Name = "ChannelId", Description = "The id of the channel", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "POST")]
|
||||
public string ChannelId { get; set; }
|
||||
}
|
||||
|
||||
[Route("/Items/{ItemId}", "POST")]
|
||||
[Api(("Updates an item"))]
|
||||
public class UpdateItem : BaseItemDto, IReturnVoid
|
||||
|
@ -98,13 +90,6 @@ namespace MediaBrowser.Api
|
|||
Task.WaitAll(task);
|
||||
}
|
||||
|
||||
public void Post(UpdateChannel request)
|
||||
{
|
||||
var task = UpdateItem(request);
|
||||
|
||||
Task.WaitAll(task);
|
||||
}
|
||||
|
||||
private async Task UpdateItem(UpdateItem request)
|
||||
{
|
||||
var item = _dtoService.GetItemByDtoId(request.ItemId);
|
||||
|
@ -144,15 +129,6 @@ namespace MediaBrowser.Api
|
|||
await _libraryManager.UpdateItem(item, ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
private async Task UpdateItem(UpdateChannel request)
|
||||
{
|
||||
var item = _liveTv.GetInternalChannel(request.Id);
|
||||
|
||||
UpdateItem(request, item);
|
||||
|
||||
await _libraryManager.UpdateItem(item, ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
public void Post(UpdateArtist request)
|
||||
{
|
||||
var task = UpdateItem(request);
|
||||
|
|
|
@ -13,9 +13,9 @@ using System.Threading.Tasks;
|
|||
|
||||
namespace MediaBrowser.Api.LiveTv
|
||||
{
|
||||
[Route("/LiveTv/Services", "GET")]
|
||||
[Route("/LiveTv/Info", "GET")]
|
||||
[Api(Description = "Gets available live tv services.")]
|
||||
public class GetServices : IReturn<List<LiveTvServiceInfo>>
|
||||
public class GetLiveTvInfo : IReturn<LiveTvInfo>
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -290,13 +290,19 @@ namespace MediaBrowser.Api.LiveTv
|
|||
}
|
||||
}
|
||||
|
||||
public object Get(GetServices request)
|
||||
public object Get(GetLiveTvInfo request)
|
||||
{
|
||||
var services = _liveTvManager.Services
|
||||
.Select(GetServiceInfo)
|
||||
.ToList();
|
||||
|
||||
return ToOptimizedResult(services);
|
||||
var info = new LiveTvInfo
|
||||
{
|
||||
Services = services,
|
||||
ActiveServiceName = _liveTvManager.ActiveService == null ? null : _liveTvManager.ActiveService.Name
|
||||
};
|
||||
|
||||
return ToOptimizedResult(info);
|
||||
}
|
||||
|
||||
private LiveTvServiceInfo GetServiceInfo(ILiveTvService service)
|
||||
|
|
|
@ -1004,9 +1004,9 @@ namespace MediaBrowser.Api.Playback
|
|||
RequestedUrl = url
|
||||
};
|
||||
|
||||
Guid itemId;
|
||||
var item = DtoService.GetItemByDtoId(request.Id);
|
||||
|
||||
if (string.Equals(request.Type, "Recording", StringComparison.OrdinalIgnoreCase))
|
||||
if (item is ILiveTvRecording)
|
||||
{
|
||||
var recording = await LiveTvManager.GetInternalRecording(request.Id, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
|
@ -1042,11 +1042,10 @@ namespace MediaBrowser.Api.Playback
|
|||
}
|
||||
}
|
||||
|
||||
itemId = recording.Id;
|
||||
//state.RunTimeTicks = recording.RunTimeTicks;
|
||||
state.SendInputOverStandardInput = recording.RecordingInfo.Status == RecordingStatus.InProgress;
|
||||
}
|
||||
else if (string.Equals(request.Type, "Channel", StringComparison.OrdinalIgnoreCase))
|
||||
else if (item is LiveTvChannel)
|
||||
{
|
||||
var channel = LiveTvManager.GetInternalChannel(request.Id);
|
||||
|
||||
|
@ -1069,13 +1068,10 @@ namespace MediaBrowser.Api.Playback
|
|||
state.IsRemote = true;
|
||||
}
|
||||
|
||||
itemId = channel.Id;
|
||||
state.SendInputOverStandardInput = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
var item = DtoService.GetItemByDtoId(request.Id);
|
||||
|
||||
state.MediaPath = item.Path;
|
||||
state.IsRemote = item.LocationType == LocationType.Remote;
|
||||
|
||||
|
@ -1093,14 +1089,13 @@ namespace MediaBrowser.Api.Playback
|
|||
}
|
||||
|
||||
state.RunTimeTicks = item.RunTimeTicks;
|
||||
itemId = item.Id;
|
||||
}
|
||||
|
||||
var videoRequest = request as VideoStreamRequest;
|
||||
|
||||
var mediaStreams = ItemRepository.GetMediaStreams(new MediaStreamQuery
|
||||
{
|
||||
ItemId = itemId
|
||||
ItemId = item.Id
|
||||
|
||||
}).ToList();
|
||||
|
||||
|
|
|
@ -65,12 +65,6 @@ namespace MediaBrowser.Api.Playback
|
|||
/// No need to put this in api docs since it's dlna only
|
||||
/// </summary>
|
||||
public bool AlbumArt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type.
|
||||
/// </summary>
|
||||
/// <value>The type.</value>
|
||||
public string Type { get; set; }
|
||||
}
|
||||
|
||||
public class VideoStreamRequest : StreamRequest
|
||||
|
|
|
@ -114,5 +114,10 @@ namespace MediaBrowser.Api.UserLibrary
|
|||
return LibraryManager.GetAllArtists(items)
|
||||
.Select(name => LibraryManager.GetArtist(name));
|
||||
}
|
||||
|
||||
protected override IEnumerable<BaseItem> GetLibraryItems(MusicArtist item, IEnumerable<BaseItem> libraryItems)
|
||||
{
|
||||
return libraryItems.OfType<IHasArtist>().Where(i => i.HasArtist(item.Name)).Cast<BaseItem>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -93,6 +93,8 @@ namespace MediaBrowser.Api.UserLibrary
|
|||
|
||||
var filteredItems = FilterItems(request, extractedItems, user);
|
||||
|
||||
filteredItems = FilterByLibraryItems(request, filteredItems, user);
|
||||
|
||||
filteredItems = ItemsService.ApplySortOrder(request, filteredItems, user, LibraryManager).Cast<TItemType>();
|
||||
|
||||
var ibnItemsArray = filteredItems.ToList();
|
||||
|
@ -127,6 +129,39 @@ namespace MediaBrowser.Api.UserLibrary
|
|||
return result;
|
||||
}
|
||||
|
||||
private IEnumerable<TItemType> FilterByLibraryItems(GetItemsByName request, IEnumerable<TItemType> items, User user)
|
||||
{
|
||||
var filters = request.GetFilters().ToList();
|
||||
|
||||
if (filters.Contains(ItemFilter.IsPlayed))
|
||||
{
|
||||
var libraryItems = user.RootFolder.GetRecursiveChildren(user).ToList();
|
||||
|
||||
items = items.Where(i => GetLibraryItems(i, libraryItems).All(l =>
|
||||
{
|
||||
var userdata = UserDataRepository.GetUserData(user.Id, l.GetUserDataKey());
|
||||
|
||||
return userdata != null && userdata.Played;
|
||||
}));
|
||||
}
|
||||
|
||||
if (filters.Contains(ItemFilter.IsUnplayed))
|
||||
{
|
||||
var libraryItems = user.RootFolder.GetRecursiveChildren(user).ToList();
|
||||
|
||||
items = items.Where(i => GetLibraryItems(i, libraryItems).All(l =>
|
||||
{
|
||||
var userdata = UserDataRepository.GetUserData(user.Id, l.GetUserDataKey());
|
||||
|
||||
return userdata == null || !userdata.Played;
|
||||
}));
|
||||
}
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
protected abstract IEnumerable<BaseItem> GetLibraryItems(TItemType item, IEnumerable<BaseItem> libraryItems);
|
||||
|
||||
/// <summary>
|
||||
/// Filters the items.
|
||||
/// </summary>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using MediaBrowser.Controller.Dto;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Entities.Audio;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.Persistence;
|
||||
using MediaBrowser.Model.Dto;
|
||||
|
@ -109,5 +110,10 @@ namespace MediaBrowser.Api.UserLibrary
|
|||
.Distinct(StringComparer.OrdinalIgnoreCase)
|
||||
.Select(name => LibraryManager.GetGameGenre(name));
|
||||
}
|
||||
|
||||
protected override IEnumerable<BaseItem> GetLibraryItems(GameGenre item, IEnumerable<BaseItem> libraryItems)
|
||||
{
|
||||
return libraryItems.Where(i => (i is Game) && i.Genres.Contains(item.Name, StringComparer.OrdinalIgnoreCase));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using MediaBrowser.Controller.Dto;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Entities.Audio;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.Persistence;
|
||||
using MediaBrowser.Model.Dto;
|
||||
|
@ -113,5 +114,10 @@ namespace MediaBrowser.Api.UserLibrary
|
|||
.Distinct(StringComparer.OrdinalIgnoreCase)
|
||||
.Select(name => LibraryManager.GetGenre(name));
|
||||
}
|
||||
|
||||
protected override IEnumerable<BaseItem> GetLibraryItems(Genre item, IEnumerable<BaseItem> libraryItems)
|
||||
{
|
||||
return libraryItems.Where(i => !(i is Game) && !(i is IHasMusicGenres) && i.Genres.Contains(item.Name, StringComparer.OrdinalIgnoreCase));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -109,5 +109,10 @@ namespace MediaBrowser.Api.UserLibrary
|
|||
.Distinct(StringComparer.OrdinalIgnoreCase)
|
||||
.Select(name => LibraryManager.GetMusicGenre(name));
|
||||
}
|
||||
|
||||
protected override IEnumerable<BaseItem> GetLibraryItems(MusicGenre item, IEnumerable<BaseItem> libraryItems)
|
||||
{
|
||||
return libraryItems.Where(i => (i is IHasMusicGenres) && i.Genres.Contains(item.Name, StringComparer.OrdinalIgnoreCase));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -163,5 +163,10 @@ namespace MediaBrowser.Api.UserLibrary
|
|||
|
||||
people.Where(p => personTypes.Contains(p.Type ?? string.Empty, StringComparer.OrdinalIgnoreCase) || personTypes.Contains(p.Role ?? string.Empty, StringComparer.OrdinalIgnoreCase));
|
||||
}
|
||||
|
||||
protected override IEnumerable<BaseItem> GetLibraryItems(Person item, IEnumerable<BaseItem> libraryItems)
|
||||
{
|
||||
return libraryItems.Where(i => i.People.Any(p => string.Equals(p.Name, item.Name, StringComparison.OrdinalIgnoreCase)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -114,5 +114,10 @@ namespace MediaBrowser.Api.UserLibrary
|
|||
.Distinct(StringComparer.OrdinalIgnoreCase)
|
||||
.Select(name => LibraryManager.GetStudio(name));
|
||||
}
|
||||
|
||||
protected override IEnumerable<BaseItem> GetLibraryItems(Studio item, IEnumerable<BaseItem> libraryItems)
|
||||
{
|
||||
return libraryItems.Where(i => i.Studios.Contains(item.Name, StringComparer.OrdinalIgnoreCase));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -114,5 +114,19 @@ namespace MediaBrowser.Api.UserLibrary
|
|||
.Distinct()
|
||||
.Select(year => LibraryManager.GetYear(year));
|
||||
}
|
||||
|
||||
protected readonly CultureInfo UsCulture = new CultureInfo("en-US");
|
||||
|
||||
protected override IEnumerable<BaseItem> GetLibraryItems(Year item, IEnumerable<BaseItem> libraryItems)
|
||||
{
|
||||
int year;
|
||||
|
||||
if (!int.TryParse(item.Name, NumberStyles.Integer, UsCulture, out year))
|
||||
{
|
||||
return libraryItems;
|
||||
}
|
||||
|
||||
return libraryItems.Where(i => i.ProductionYear.HasValue && i.ProductionYear.Value == year);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,6 +57,13 @@ namespace MediaBrowser.Controller.Dto
|
|||
/// <returns>BaseItem.</returns>
|
||||
BaseItem GetItemByDtoId(string id, Guid? userId = null);
|
||||
|
||||
/// <summary>
|
||||
/// Attaches the primary image aspect ratio.
|
||||
/// </summary>
|
||||
/// <param name="dto">The dto.</param>
|
||||
/// <param name="item">The item.</param>
|
||||
void AttachPrimaryImageAspectRatio(IItemDto dto, IHasImages item);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the base item dto.
|
||||
/// </summary>
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
/// <summary>
|
||||
/// Class BaseItem
|
||||
/// </summary>
|
||||
public abstract class BaseItem : IHasProviderIds, ILibraryItem, IHasImages, IHasUserData
|
||||
public abstract class BaseItem : IHasProviderIds, IBaseItem, IHasImages, IHasUserData
|
||||
{
|
||||
protected BaseItem()
|
||||
{
|
||||
|
@ -662,7 +662,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
return LibraryManager.ResolvePaths<Trailer>(files, null).Select(video =>
|
||||
{
|
||||
// Try to retrieve it from the db. If we don't find it, use the resolved version
|
||||
var dbItem = LibraryManager.RetrieveItem(video.Id) as Trailer;
|
||||
var dbItem = LibraryManager.GetItemById(video.Id) as Trailer;
|
||||
|
||||
if (dbItem != null)
|
||||
{
|
||||
|
@ -723,7 +723,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
return LibraryManager.ResolvePaths<Audio.Audio>(files, null).Select(audio =>
|
||||
{
|
||||
// Try to retrieve it from the db. If we don't find it, use the resolved version
|
||||
var dbItem = LibraryManager.RetrieveItem(audio.Id) as Audio.Audio;
|
||||
var dbItem = LibraryManager.GetItemById(audio.Id) as Audio.Audio;
|
||||
|
||||
if (dbItem != null)
|
||||
{
|
||||
|
@ -781,7 +781,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
return LibraryManager.ResolvePaths<Video>(files, null).Select(item =>
|
||||
{
|
||||
// Try to retrieve it from the db. If we don't find it, use the resolved version
|
||||
var dbItem = LibraryManager.RetrieveItem(item.Id) as Video;
|
||||
var dbItem = LibraryManager.GetItemById(item.Id) as Video;
|
||||
|
||||
if (dbItem != null)
|
||||
{
|
||||
|
|
|
@ -884,7 +884,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
// First get using the cached Id
|
||||
if (info.ItemId != Guid.Empty)
|
||||
{
|
||||
item = LibraryManager.GetItemById(info.ItemId);
|
||||
item = LibraryManager.GetItemById(info.ItemId) as BaseItem;
|
||||
}
|
||||
|
||||
// If still null, search by path
|
||||
|
|
|
@ -5,7 +5,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
/// <summary>
|
||||
/// Interface ILibraryItem
|
||||
/// </summary>
|
||||
public interface ILibraryItem
|
||||
public interface IBaseItem
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the name.
|
|
@ -179,7 +179,7 @@ namespace MediaBrowser.Controller.Entities.Movies
|
|||
return LibraryManager.ResolvePaths<Video>(files, null).Select(video =>
|
||||
{
|
||||
// Try to retrieve it from the db. If we don't find it, use the resolved version
|
||||
var dbItem = LibraryManager.RetrieveItem(video.Id) as Video;
|
||||
var dbItem = LibraryManager.GetItemById(video.Id) as Video;
|
||||
|
||||
if (dbItem != null)
|
||||
{
|
||||
|
|
|
@ -268,7 +268,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
return LibraryManager.ResolvePaths<Video>(files, null).Select(video =>
|
||||
{
|
||||
// Try to retrieve it from the db. If we don't find it, use the resolved version
|
||||
var dbItem = LibraryManager.RetrieveItem(video.Id) as Video;
|
||||
var dbItem = LibraryManager.GetItemById(video.Id) as Video;
|
||||
|
||||
if (dbItem != null)
|
||||
{
|
||||
|
|
|
@ -99,7 +99,7 @@
|
|||
<Compile Include="Entities\IHasTrailers.cs" />
|
||||
<Compile Include="Entities\IHasUserData.cs" />
|
||||
<Compile Include="Entities\IItemByName.cs" />
|
||||
<Compile Include="Entities\ILibraryItem.cs" />
|
||||
<Compile Include="Entities\IBaseItem.cs" />
|
||||
<Compile Include="Entities\ImageSourceInfo.cs" />
|
||||
<Compile Include="Entities\LinkedChild.cs" />
|
||||
<Compile Include="Entities\MusicVideo.cs" />
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
using System.IO;
|
||||
using MediaBrowser.Model.Dto;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Model.Dto;
|
||||
|
||||
namespace MediaBrowser.Model.ApiClient
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace MediaBrowser.Model.LiveTv
|
|||
/// <summary>
|
||||
/// Class ChannelInfoDto
|
||||
/// </summary>
|
||||
public class ChannelInfoDto
|
||||
public class ChannelInfoDto : IItemDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the name.
|
||||
|
@ -76,6 +76,18 @@ namespace MediaBrowser.Model.LiveTv
|
|||
/// <value>The now playing program.</value>
|
||||
public ProgramInfoDto CurrentProgram { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the primary image aspect ratio, after image enhancements.
|
||||
/// </summary>
|
||||
/// <value>The primary image aspect ratio.</value>
|
||||
public double? PrimaryImageAspectRatio { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the primary image aspect ratio, before image enhancements.
|
||||
/// </summary>
|
||||
/// <value>The original primary image aspect ratio.</value>
|
||||
public double? OriginalPrimaryImageAspectRatio { get; set; }
|
||||
|
||||
public ChannelInfoDto()
|
||||
{
|
||||
ImageTags = new Dictionary<ImageType, Guid>();
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Model.LiveTv
|
||||
{
|
||||
|
@ -28,4 +29,24 @@ namespace MediaBrowser.Model.LiveTv
|
|||
/// <value>The end date.</value>
|
||||
public DateTime EndDate { get; set; }
|
||||
}
|
||||
|
||||
public class LiveTvInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the services.
|
||||
/// </summary>
|
||||
/// <value>The services.</value>
|
||||
public List<LiveTvServiceInfo> Services { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the active service.
|
||||
/// </summary>
|
||||
/// <value>The name of the active service.</value>
|
||||
public string ActiveServiceName { get; set; }
|
||||
|
||||
public LiveTvInfo()
|
||||
{
|
||||
Services = new List<LiveTvServiceInfo>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ namespace MediaBrowser.Providers
|
|||
return;
|
||||
}
|
||||
|
||||
var dbItem = _libraryManager.RetrieveItem(item.Id);
|
||||
var dbItem = _libraryManager.GetItemById(item.Id);
|
||||
var isNewItem = false;
|
||||
|
||||
if (dbItem != null)
|
||||
|
|
|
@ -131,11 +131,10 @@ namespace MediaBrowser.Server.Implementations.Dto
|
|||
{
|
||||
if (user == null)
|
||||
{
|
||||
//counts = item.ItemCounts;
|
||||
return;
|
||||
}
|
||||
|
||||
ItemByNameCounts counts = item.GetItemByNameCounts(user.Id) ?? new ItemByNameCounts();
|
||||
var counts = item.GetItemByNameCounts(user.Id) ?? new ItemByNameCounts();
|
||||
|
||||
dto.ChildCount = counts.TotalCount;
|
||||
|
||||
|
@ -1244,7 +1243,7 @@ namespace MediaBrowser.Server.Implementations.Dto
|
|||
/// <param name="dto">The dto.</param>
|
||||
/// <param name="item">The item.</param>
|
||||
/// <returns>Task.</returns>
|
||||
private void AttachPrimaryImageAspectRatio(IItemDto dto, BaseItem item)
|
||||
public void AttachPrimaryImageAspectRatio(IItemDto dto, IHasImages item)
|
||||
{
|
||||
var path = item.PrimaryImagePath;
|
||||
|
||||
|
|
|
@ -1045,13 +1045,13 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
|||
info.DayPattern = _tvDtoService.GetDayPattern(info.Days);
|
||||
|
||||
info.Name = program.Name;
|
||||
info.ChannelId = program.ChannelId;
|
||||
info.ChannelId = programDto.ChannelId;
|
||||
info.ChannelName = programDto.ChannelName;
|
||||
info.EndDate = program.EndDate;
|
||||
info.StartDate = program.StartDate;
|
||||
info.Name = program.Name;
|
||||
info.Overview = program.Overview;
|
||||
info.ProgramId = program.Id;
|
||||
info.ProgramId = programDto.Id;
|
||||
info.ExternalProgramId = programDto.ExternalId;
|
||||
|
||||
return info;
|
||||
|
|
|
@ -567,7 +567,6 @@ namespace MediaBrowser.WebDashboard.Api
|
|||
await AppendResource(memoryStream, "thirdparty/jquerymobile-1.4.0/jquery.mobile-1.4.0.min.js", newLineBytes).ConfigureAwait(false);
|
||||
|
||||
//await AppendResource(memoryStream, "thirdparty/jquery.infinite-scroll-helper.min.js", newLineBytes).ConfigureAwait(false);
|
||||
await AppendResource(memoryStream, "thirdparty/jquery.hoverIntent.minified.js", newLineBytes).ConfigureAwait(false);
|
||||
|
||||
var versionString = string.Format("window.dashboardVersion='{0}';", _appHost.ApplicationVersion);
|
||||
var versionBytes = Encoding.UTF8.GetBytes(versionString);
|
||||
|
|
|
@ -378,20 +378,9 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
|
|||
});
|
||||
};
|
||||
|
||||
self.getAuthorizedFeatures = function (options) {
|
||||
self.getLiveTvInfo = function (options) {
|
||||
|
||||
var url = self.getUrl("Users/AuthorizedFeatures", options || {});
|
||||
|
||||
return self.ajax({
|
||||
type: "GET",
|
||||
url: url,
|
||||
dataType: "json"
|
||||
});
|
||||
};
|
||||
|
||||
self.getLiveTvServices = function (options) {
|
||||
|
||||
var url = self.getUrl("LiveTv/Services", options || {});
|
||||
var url = self.getUrl("LiveTv/Info", options || {});
|
||||
|
||||
return self.ajax({
|
||||
type: "GET",
|
||||
|
@ -2714,22 +2703,6 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
|
|||
});
|
||||
};
|
||||
|
||||
self.updateLiveTvChannel = function (item) {
|
||||
|
||||
if (!item) {
|
||||
throw new Error("null item");
|
||||
}
|
||||
|
||||
var url = self.getUrl("LiveTv/Channels/" + item.Id);
|
||||
|
||||
return self.ajax({
|
||||
type: "POST",
|
||||
url: url,
|
||||
data: JSON.stringify(item),
|
||||
contentType: "application/json"
|
||||
});
|
||||
};
|
||||
|
||||
self.updateArtist = function (item) {
|
||||
|
||||
if (!item) {
|
||||
|
|
|
@ -496,9 +496,6 @@
|
|||
<Content Include="dashboard-ui\thirdparty\jquery-2.0.3.min.js">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="dashboard-ui\thirdparty\jquery.hoverIntent.minified.js">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="dashboard-ui\thirdparty\jquery.infinite-scroll-helper.min.js">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.228" targetFramework="net45" />
|
||||
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.230" targetFramework="net45" />
|
||||
</packages>
|
Loading…
Reference in New Issue
Block a user