From 8b7a8ab3963b1a55bc194767cc834c8cf43836a7 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 31 Oct 2016 03:47:34 -0400 Subject: [PATCH] make photos project portable --- Emby.Drawing/Emby.Drawing.csproj | 4 +- Emby.Drawing/ImageProcessor.cs | 4 +- Emby.Photos/Emby.Photos.csproj | 16 +- Emby.Photos/Emby.Photos.nuget.targets | 6 + Emby.Photos/PhotoProvider.cs | 2 +- Emby.Photos/StreamFileAbstraction.cs | 33 - Emby.Photos/project.json | 17 + Emby.Photos/project.lock.json | 3965 +++++++++++++++++++++++++ Emby.Server.sln | 9 + 9 files changed, 4007 insertions(+), 49 deletions(-) create mode 100644 Emby.Photos/Emby.Photos.nuget.targets delete mode 100644 Emby.Photos/StreamFileAbstraction.cs create mode 100644 Emby.Photos/project.json create mode 100644 Emby.Photos/project.lock.json diff --git a/Emby.Drawing/Emby.Drawing.csproj b/Emby.Drawing/Emby.Drawing.csproj index 5c0870d3cd..a883d06495 100644 --- a/Emby.Drawing/Emby.Drawing.csproj +++ b/Emby.Drawing/Emby.Drawing.csproj @@ -44,8 +44,8 @@ - - ..\ThirdParty\taglib\taglib-sharp.dll + + ..\ThirdParty\taglib\TagLib.Portable.dll diff --git a/Emby.Drawing/ImageProcessor.cs b/Emby.Drawing/ImageProcessor.cs index 47c9357fdf..aa18058719 100644 --- a/Emby.Drawing/ImageProcessor.cs +++ b/Emby.Drawing/ImageProcessor.cs @@ -21,6 +21,8 @@ using MediaBrowser.Common.IO; using MediaBrowser.Controller.IO; using MediaBrowser.Controller.Library; using MediaBrowser.Model.Net; +using TagLib; +using File = System.IO.File; namespace Emby.Drawing { @@ -578,7 +580,7 @@ namespace Emby.Drawing { try { - using (var file = TagLib.File.Create(path)) + using (var file = TagLib.File.Create(new StreamFileAbstraction(Path.GetFileName(path), _fileSystem.OpenRead(path), null))) { var image = file as TagLib.Image.File; diff --git a/Emby.Photos/Emby.Photos.csproj b/Emby.Photos/Emby.Photos.csproj index 8ff5701993..ed126a41c4 100644 --- a/Emby.Photos/Emby.Photos.csproj +++ b/Emby.Photos/Emby.Photos.csproj @@ -9,9 +9,10 @@ Properties Emby.Photos Emby.Photos - v4.6 512 - + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + Profile7 + v4.5 true @@ -31,20 +32,11 @@ 4 - - - - - - - - ..\ThirdParty\taglib\TagLib.Portable.dll - @@ -62,7 +54,7 @@ MediaBrowser.Model - +