added recording logging

This commit is contained in:
Luke Pulverenti 2015-08-04 23:43:54 -04:00
parent feed1c0b7d
commit 7caedd1aee
3 changed files with 7 additions and 3 deletions

View File

@ -262,7 +262,7 @@ namespace MediaBrowser.Api.Library
/// Initializes a new instance of the <see cref="LibraryService" /> class.
/// </summary>
public LibraryService(IItemRepository itemRepo, ILibraryManager libraryManager, IUserManager userManager,
IDtoService dtoService, IUserDataManager userDataManager, IAuthorizationContext authContext, IActivityManager activityManager, ILocalizationManager localization)
IDtoService dtoService, IUserDataManager userDataManager, IAuthorizationContext authContext, IActivityManager activityManager, ILocalizationManager localization, ILiveTvManager liveTv)
{
_itemRepo = itemRepo;
_libraryManager = libraryManager;
@ -272,6 +272,7 @@ namespace MediaBrowser.Api.Library
_authContext = authContext;
_activityManager = activityManager;
_localization = localization;
_liveTv = liveTv;
}
public object Get(GetMediaFolders request)

View File

@ -1217,7 +1217,7 @@ namespace MediaBrowser.Server.Implementations.Library
{
var result = ItemRepository.GetItemIdsList(query);
var items = result.Select(GetItemById).ToArray();
var items = result.Select(GetItemById).Where(i => i != null).ToArray();
return new QueryResult<BaseItem>
{

View File

@ -541,13 +541,16 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
}
recording.Status = RecordingStatus.Completed;
_logger.Info("Recording completed");
}
catch (OperationCanceledException)
{
_logger.Info("Recording cancelled");
recording.Status = RecordingStatus.Completed;
}
catch
catch (Exception ex)
{
_logger.ErrorException("Error recording", ex);
recording.Status = RecordingStatus.Error;
}