aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Emby.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.cs9
-rw-r--r--MediaBrowser.Api/ApiEntryPoint.cs2
2 files changed, 7 insertions, 4 deletions
diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.cs
index b825ea3b0..a2ac60b31 100644
--- a/Emby.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.cs
+++ b/Emby.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.cs
@@ -43,12 +43,14 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
{
var jsonFile = path + ".json";
- try
+ if (!File.Exists(jsonFile))
{
- return _jsonSerializer.DeserializeFromFile<List<T>>(jsonFile) ?? new List<T>();
+ return new List<T>();
}
- catch (FileNotFoundException)
+
+ try
{
+ return _jsonSerializer.DeserializeFromFile<List<T>>(jsonFile) ?? new List<T>();
}
catch (IOException)
{
@@ -57,6 +59,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
{
Logger.LogError(ex, "Error deserializing {jsonFile}", jsonFile);
}
+
return new List<T>();
}
diff --git a/MediaBrowser.Api/ApiEntryPoint.cs b/MediaBrowser.Api/ApiEntryPoint.cs
index 8dbc26356..ceff6b02e 100644
--- a/MediaBrowser.Api/ApiEntryPoint.cs
+++ b/MediaBrowser.Api/ApiEntryPoint.cs
@@ -170,7 +170,7 @@ namespace MediaBrowser.Api
/// </summary>
private void DeleteEncodedMediaCache()
{
- var path = _config.ApplicationPaths.TranscodingTempPath;
+ var path = _config.ApplicationPaths.GetTranscodingTempPath();
foreach (var file in _fileSystem.GetFilePaths(path, true))
{