aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities/BaseItem.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/Entities/BaseItem.cs')
-rw-r--r--MediaBrowser.Controller/Entities/BaseItem.cs23
1 files changed, 7 insertions, 16 deletions
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs
index e3b5b5117..e80fe3387 100644
--- a/MediaBrowser.Controller/Entities/BaseItem.cs
+++ b/MediaBrowser.Controller/Entities/BaseItem.cs
@@ -1,41 +1,32 @@
using MediaBrowser.Common.Extensions;
using MediaBrowser.Controller.Channels;
-using MediaBrowser.Controller.Collections;
using MediaBrowser.Controller.Configuration;
-using MediaBrowser.Controller.Drawing;
using MediaBrowser.Controller.Dto;
using MediaBrowser.Controller.Library;
-using MediaBrowser.Controller.LiveTv;
using MediaBrowser.Controller.Persistence;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Library;
-using MediaBrowser.Model.Logging;
using MediaBrowser.Model.Users;
using System;
using System.Collections.Generic;
using System.Globalization;
-using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
-
-using MediaBrowser.Controller.Dto;
using MediaBrowser.Controller.Extensions;
-using MediaBrowser.Controller.IO;
-using MediaBrowser.Controller.MediaEncoding;
using MediaBrowser.Controller.Sorting;
using MediaBrowser.Model.Extensions;
using MediaBrowser.Model.Globalization;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.LiveTv;
using MediaBrowser.Model.Providers;
-using MediaBrowser.Model.Querying;
using MediaBrowser.Model.Serialization;
using MediaBrowser.Model.MediaInfo;
+using Microsoft.Extensions.Logging;
namespace MediaBrowser.Controller.Entities
{
@@ -798,7 +789,7 @@ namespace MediaBrowser.Controller.Entities
builder.Append(chunkBuilder);
}
- //Logger.Debug("ModifySortChunks Start: {0} End: {1}", name, builder.ToString());
+ //logger.LogDebug("ModifySortChunks Start: {0} End: {1}", name, builder.ToString());
return builder.ToString().RemoveDiacritics();
}
@@ -1414,7 +1405,7 @@ namespace MediaBrowser.Controller.Entities
}
catch (Exception ex)
{
- Logger.ErrorException("Error refreshing owned items for {0}", ex, Path ?? Name);
+ Logger.LogError(ex, "Error refreshing owned items for {path}", Path ?? Name);
}
}
@@ -1802,7 +1793,7 @@ namespace MediaBrowser.Controller.Entities
if (!isAllowed)
{
- Logger.Debug("{0} has an unrecognized parental rating of {1}.", Name, rating);
+ Logger.LogDebug("{0} has an unrecognized parental rating of {1}.", Name, rating);
}
return isAllowed;
@@ -2058,7 +2049,7 @@ namespace MediaBrowser.Controller.Entities
if (itemByPath == null)
{
- //Logger.Warn("Unable to find linked item at path {0}", info.Path);
+ //Logger.LogWarning("Unable to find linked item at path {0}", info.Path);
}
return itemByPath;
@@ -2070,7 +2061,7 @@ namespace MediaBrowser.Controller.Entities
if (item == null)
{
- //Logger.Warn("Unable to find linked item at path {0}", info.Path);
+ //Logger.LogWarning("Unable to find linked item at path {0}", info.Path);
}
return item;
@@ -2213,7 +2204,7 @@ namespace MediaBrowser.Controller.Entities
/// <returns>Task.</returns>
public virtual void ChangedExternally()
{
- ProviderManager.QueueRefresh(Id, new MetadataRefreshOptions(FileSystem)
+ ProviderManager.QueueRefresh(Id, new MetadataRefreshOptions(new DirectoryService(Logger, FileSystem))
{
}, RefreshPriority.High);