From 6fbd75b899a3fe0097e6bc927f6363aea4b471ca Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 16 Oct 2015 18:36:01 -0400 Subject: [PATCH] 3.0.5768.0 --- .../LiveTv/LiveTvManager.cs | 13 ++++++++++--- SharedVersion.cs | 4 ++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs index 538a963fd..7dc9f25b0 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs @@ -706,7 +706,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv isNew = true; } - + item.ChannelId = _tvDtoService.GetInternalChannelId(serviceName, info.ChannelId).ToString("N"); item.CommunityRating = info.CommunityRating; item.OfficialRating = info.OfficialRating; @@ -750,6 +750,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv recording.DateCreated = _fileSystem.GetCreationTimeUtc(fileInfo); recording.DateModified = _fileSystem.GetLastWriteTimeUtc(fileInfo); + item.Path = info.Path; } else if (!string.IsNullOrEmpty(info.Url)) { @@ -757,16 +758,22 @@ namespace MediaBrowser.Server.Implementations.LiveTv item.Path = info.Url; } + var metadataRefreshMode = MetadataRefreshMode.Default; + if (isNew) { await _libraryManager.CreateItem(item, cancellationToken).ConfigureAwait(false); } else if (pathChanged || info.DateLastUpdated > recording.DateLastSaved || statusChanged) { + metadataRefreshMode = MetadataRefreshMode.FullRefresh; await _libraryManager.UpdateItem(item, ItemUpdateType.MetadataImport, cancellationToken).ConfigureAwait(false); } - _providerManager.QueueRefresh(item.Id, new MetadataRefreshOptions(_fileSystem)); + _providerManager.QueueRefresh(item.Id, new MetadataRefreshOptions(_fileSystem) + { + MetadataRefreshMode = metadataRefreshMode + }); return item.Id; } @@ -1614,7 +1621,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv } catch (ResourceNotFoundException) { - + } await _libraryManager.DeleteItem((BaseItem)recording).ConfigureAwait(false); diff --git a/SharedVersion.cs b/SharedVersion.cs index 20582e644..8675cc16c 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,4 +1,4 @@ using System.Reflection; -[assembly: AssemblyVersion("3.0.*")] -//[assembly: AssemblyVersion("3.0.5724.6")] +//[assembly: AssemblyVersion("3.0.*")] +[assembly: AssemblyVersion("3.0.5768.0")]