mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 11:34:57 +02:00
fix live tv image
This commit is contained in:
parent
ec64da2a3b
commit
036301795e
1 changed files with 12 additions and 4 deletions
|
@ -5,6 +5,7 @@ using MediaBrowser.Controller.Entities.Audio;
|
||||||
using MediaBrowser.Controller.Entities.Movies;
|
using MediaBrowser.Controller.Entities.Movies;
|
||||||
using MediaBrowser.Controller.Entities.TV;
|
using MediaBrowser.Controller.Entities.TV;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
|
using MediaBrowser.Controller.LiveTv;
|
||||||
using MediaBrowser.Controller.Localization;
|
using MediaBrowser.Controller.Localization;
|
||||||
using MediaBrowser.Controller.Net;
|
using MediaBrowser.Controller.Net;
|
||||||
using MediaBrowser.Controller.Persistence;
|
using MediaBrowser.Controller.Persistence;
|
||||||
|
@ -255,6 +256,7 @@ namespace MediaBrowser.Api.Library
|
||||||
private readonly IAuthorizationContext _authContext;
|
private readonly IAuthorizationContext _authContext;
|
||||||
private readonly IActivityManager _activityManager;
|
private readonly IActivityManager _activityManager;
|
||||||
private readonly ILocalizationManager _localization;
|
private readonly ILocalizationManager _localization;
|
||||||
|
private readonly ILiveTvManager _liveTv;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="LibraryService" /> class.
|
/// Initializes a new instance of the <see cref="LibraryService" /> class.
|
||||||
|
@ -524,7 +526,6 @@ namespace MediaBrowser.Api.Library
|
||||||
public void Delete(DeleteItem request)
|
public void Delete(DeleteItem request)
|
||||||
{
|
{
|
||||||
var item = _libraryManager.GetItemById(request.Id);
|
var item = _libraryManager.GetItemById(request.Id);
|
||||||
|
|
||||||
var auth = _authContext.GetAuthorizationInfo(Request);
|
var auth = _authContext.GetAuthorizationInfo(Request);
|
||||||
var user = _userManager.GetUserById(auth.UserId);
|
var user = _userManager.GetUserById(auth.UserId);
|
||||||
|
|
||||||
|
@ -533,10 +534,17 @@ namespace MediaBrowser.Api.Library
|
||||||
throw new UnauthorizedAccessException();
|
throw new UnauthorizedAccessException();
|
||||||
}
|
}
|
||||||
|
|
||||||
var task = _libraryManager.DeleteItem(item);
|
if (item is ILiveTvRecording)
|
||||||
|
{
|
||||||
|
var task = _liveTv.DeleteRecording(request.Id);
|
||||||
Task.WaitAll(task);
|
Task.WaitAll(task);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var task = _libraryManager.DeleteItem(item);
|
||||||
|
Task.WaitAll(task);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the critic reviews async.
|
/// Gets the critic reviews async.
|
||||||
|
|
Loading…
Reference in a new issue