aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Social/SharingService.cs
diff options
context:
space:
mode:
authorEric Reed <ebr@mediabrowser3.com>2015-10-16 18:36:41 -0400
committerEric Reed <ebr@mediabrowser3.com>2015-10-16 18:36:41 -0400
commit8ef0596f0fa9fe0259bd1f706a92d4eab1bc4c93 (patch)
tree90c952932ccc958055cad2500ab4764ec281ad67 /MediaBrowser.Api/Social/SharingService.cs
parent1261f51412fe6c3ddab12f615026b2c4ecc4b62b (diff)
parentd1195257aa6ffa8086ce6461183442ffa28365f3 (diff)
Merge branch 'dev' of https://github.com/MediaBrowser/Emby into dev
Diffstat (limited to 'MediaBrowser.Api/Social/SharingService.cs')
-rw-r--r--MediaBrowser.Api/Social/SharingService.cs18
1 files changed, 16 insertions, 2 deletions
diff --git a/MediaBrowser.Api/Social/SharingService.cs b/MediaBrowser.Api/Social/SharingService.cs
index 608008455..7d61c24ec 100644
--- a/MediaBrowser.Api/Social/SharingService.cs
+++ b/MediaBrowser.Api/Social/SharingService.cs
@@ -124,7 +124,7 @@ namespace MediaBrowser.Api.Social
Task.WaitAll(task);
}
- public object Get(GetShareImage request)
+ public async Task<object> Get(GetShareImage request)
{
var share = _sharingManager.GetShareInfo(request.Id);
@@ -143,7 +143,21 @@ namespace MediaBrowser.Api.Social
if (image != null)
{
- return ToStaticFileResult(image.Path);
+ if (image.IsLocalFile)
+ {
+ return ToStaticFileResult(image.Path);
+ }
+
+ try
+ {
+ // Don't fail the request over this
+ var updatedImage = await _libraryManager.ConvertImageToLocal(item, image, 0).ConfigureAwait(false);
+ return ToStaticFileResult(updatedImage.Path);
+ }
+ catch
+ {
+
+ }
}
// Grab a dlna icon if nothing else is available