aboutsummaryrefslogtreecommitdiff
path: root/Emby.Photos/StreamFileAbstraction.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Photos/StreamFileAbstraction.cs')
-rw-r--r--Emby.Photos/StreamFileAbstraction.cs33
1 files changed, 33 insertions, 0 deletions
diff --git a/Emby.Photos/StreamFileAbstraction.cs b/Emby.Photos/StreamFileAbstraction.cs
new file mode 100644
index 000000000..e1ea19bbe
--- /dev/null
+++ b/Emby.Photos/StreamFileAbstraction.cs
@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using MediaBrowser.Model.IO;
+using File = TagLib.File;
+
+namespace Emby.Photos
+{
+ public class StreamFileAbstraction : File.IFileAbstraction
+ {
+ public StreamFileAbstraction(string name, Stream readStream)
+ {
+ // TODO: Fix deadlock when setting an actual writable Stream
+ WriteStream = readStream;
+ ReadStream = readStream;
+ Name = name;
+ }
+
+ public string Name { get; private set; }
+
+ public Stream ReadStream { get; private set; }
+
+ public Stream WriteStream { get; private set; }
+
+ public void CloseStream(Stream stream)
+ {
+ stream.Dispose();
+ }
+ }
+}