mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
dispose stream in PhotoProvider
This commit is contained in:
parent
992ad9c2d9
commit
00507972be
@ -35,7 +35,9 @@ namespace Emby.Photos
|
|||||||
|
|
||||||
try
|
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;
|
var image = file as TagLib.Image.File;
|
||||||
|
|
||||||
@ -142,6 +144,7 @@ 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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user