diff options
| author | Michalis Adamidis <gsnerf@gsnerf.de> | 2014-08-06 21:06:34 +0200 |
|---|---|---|
| committer | Michalis Adamidis <gsnerf@gsnerf.de> | 2014-08-06 21:06:34 +0200 |
| commit | b957e7c7b91257d7f33f9890b9a14445a80164ea (patch) | |
| tree | 3a6082b1bdf717d0f28ef96f14a70c1265071ac4 /MediaBrowser.Server.Implementations/LiveTv | |
| parent | 7994f0dcd9082cc657e07dbff6ecc4e638f1f527 (diff) | |
| parent | 284bd3e9f562ae499ad8d8b778392196ac99ed3a (diff) | |
Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
Diffstat (limited to 'MediaBrowser.Server.Implementations/LiveTv')
| -rw-r--r-- | MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs index 251acb02dd..ad2b503659 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs @@ -12,7 +12,6 @@ using MediaBrowser.Controller.Localization; using MediaBrowser.Controller.Persistence; using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.Sorting; -using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Dto; using MediaBrowser.Model.Entities; using MediaBrowser.Model.LiveTv; @@ -551,24 +550,28 @@ namespace MediaBrowser.Server.Implementations.LiveTv }; } - if (!string.IsNullOrEmpty(info.Path)) - { - item.Path = info.Path; - } - else if (!string.IsNullOrEmpty(info.Url)) - { - item.Path = info.Url; - } - isNew = true; } item.RecordingInfo = info; item.ServiceName = serviceName; + var originalPath = item.Path; + + if (!string.IsNullOrEmpty(info.Path)) + { + item.Path = info.Path; + } + else if (!string.IsNullOrEmpty(info.Url)) + { + item.Path = info.Url; + } + + var pathChanged = !string.Equals(originalPath, item.Path); + await item.RefreshMetadata(new MetadataRefreshOptions { - ForceSave = isNew + ForceSave = isNew || pathChanged }, cancellationToken); |
