dispose stream in PhotoProvider
This commit is contained in:
parent
992ad9c2d9
commit
00507972be
|
@ -35,7 +35,9 @@ namespace Emby.Photos
|
|||
|
||||
try
|
||||
{
|
||||
using (var file = TagLib.File.Create(new StreamFileAbstraction(Path.GetFileName(item.Path), _fileSystem.OpenRead(item.Path), null)))
|
||||
using (var fileStream = _fileSystem.OpenRead(item.Path))
|
||||
{
|
||||
using (var file = TagLib.File.Create(new StreamFileAbstraction(Path.GetFileName(item.Path), fileStream, null)))
|
||||
{
|
||||
var image = file as TagLib.Image.File;
|
||||
|
||||
|
@ -142,6 +144,7 @@ namespace Emby.Photos
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_logger.ErrorException("Image Provider - Error reading image tag for {0}", e, item.Path);
|
||||
|
|
Loading…
Reference in New Issue
Block a user