aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/ItemLookupService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Api/ItemLookupService.cs')
-rw-r--r--MediaBrowser.Api/ItemLookupService.cs15
1 files changed, 10 insertions, 5 deletions
diff --git a/MediaBrowser.Api/ItemLookupService.cs b/MediaBrowser.Api/ItemLookupService.cs
index 8be37e210..41bfd9da2 100644
--- a/MediaBrowser.Api/ItemLookupService.cs
+++ b/MediaBrowser.Api/ItemLookupService.cs
@@ -202,14 +202,19 @@ namespace MediaBrowser.Api
// }
//}
Logger.Info("Setting provider id's to item {0}-{1}: {2}", item.Id, item.Name, _json.SerializeToString(request.ProviderIds));
+
+ // Since the refresh process won't erase provider Ids, we need to set this explicitly now.
item.ProviderIds = request.ProviderIds;
+ //item.ProductionYear = request.ProductionYear;
+ //item.Name = request.Name;
- var task = _providerManager.RefreshFullItem(item, new MetadataRefreshOptions(_fileSystem)
+ var task = _providerManager.RefreshFullItem(item, new MetadataRefreshOptions(_fileSystem)
{
MetadataRefreshMode = MetadataRefreshMode.FullRefresh,
ImageRefreshMode = ImageRefreshMode.FullRefresh,
ReplaceAllMetadata = true,
- ReplaceAllImages = request.ReplaceAllImages
+ ReplaceAllImages = request.ReplaceAllImages,
+ SearchResult = request
}, CancellationToken.None);
Task.WaitAll(task);
@@ -234,7 +239,7 @@ namespace MediaBrowser.Api
contentPath = await reader.ReadToEndAsync().ConfigureAwait(false);
}
- if (_fileSystem.FileExists(contentPath))
+ if (_fileSystem.FileExists(contentPath))
{
return ToStaticFileResult(contentPath);
}
@@ -275,7 +280,7 @@ namespace MediaBrowser.Api
var fullCachePath = GetFullCachePath(urlHash + "." + ext);
- _fileSystem.CreateDirectory(Path.GetDirectoryName(fullCachePath));
+ _fileSystem.CreateDirectory(Path.GetDirectoryName(fullCachePath));
using (var stream = result.Content)
{
using (var filestream = _fileSystem.GetFileStream(fullCachePath, FileMode.Create, FileAccess.Write, FileShare.Read, true))
@@ -284,7 +289,7 @@ namespace MediaBrowser.Api
}
}
- _fileSystem.CreateDirectory(Path.GetDirectoryName(pointerCachePath));
+ _fileSystem.CreateDirectory(Path.GetDirectoryName(pointerCachePath));
using (var writer = new StreamWriter(pointerCachePath))
{
await writer.WriteAsync(fullCachePath).ConfigureAwait(false);