Replace TagLib.Portable.dll with taglib-sharp submodule

This commit is contained in:
Bond_009 2018-12-11 14:55:33 +01:00
parent b8c275709c
commit f2a7965101
3 changed files with 86 additions and 88 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "ThirdParty/taglib-sharp"]
path = ThirdParty/taglib-sharp
url = git@github.com:mono/taglib-sharp.git

View File

@ -3,9 +3,7 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\MediaBrowser.Controller\MediaBrowser.Controller.csproj" /> <ProjectReference Include="..\MediaBrowser.Controller\MediaBrowser.Controller.csproj" />
<ProjectReference Include="..\MediaBrowser.Model\MediaBrowser.Model.csproj" /> <ProjectReference Include="..\MediaBrowser.Model\MediaBrowser.Model.csproj" />
<Reference Include="TagLib.Portable"> <ProjectReference Include="..\ThirdParty\taglib-sharp\src\taglib-sharp.csproj" />
<HintPath>..\ThirdParty\taglib\TagLib.Portable.dll</HintPath>
</Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -57,9 +57,7 @@ namespace Emby.Photos
{ {
try try
{ {
using (var fileStream = _fileSystem.OpenRead(item.Path)) using (var file = TagLib.File.Create(item.Path))
{
using (var file = TagLib.File.Create(new StreamFileAbstraction(Path.GetFileName(item.Path), fileStream, null)))
{ {
var image = file as TagLib.Image.File; var image = file as TagLib.Image.File;
@ -172,7 +170,6 @@ namespace Emby.Photos
} }
} }
} }
}
catch (Exception e) catch (Exception e)
{ {
_logger.ErrorException("Image Provider - Error reading image tag for {0}", e, item.Path); _logger.ErrorException("Image Provider - Error reading image tag for {0}", e, item.Path);