mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-09 07:10:34 +02:00
remove temp file from open subtitles
This commit is contained in:
parent
04c8cb5aec
commit
0bf4d35f53
|
@ -51,12 +51,11 @@ namespace XmlRpcHandler
|
|||
XmlWriterSettings sett = new XmlWriterSettings();
|
||||
sett.Indent = true;
|
||||
|
||||
var requestXmlPath = Path.Combine(Path.GetTempPath(), "request.xml");
|
||||
|
||||
sett.Encoding = Encoding.UTF8;
|
||||
FileStream str = new FileStream(requestXmlPath, FileMode.Create, FileAccess.Write);
|
||||
|
||||
XmlWriter XMLwrt = XmlWriter.Create(str, sett);
|
||||
using (var ms = new MemoryStream())
|
||||
{
|
||||
XmlWriter XMLwrt = XmlWriter.Create(ms, sett);
|
||||
// Let's write the methods
|
||||
foreach (XmlRpcMethodCall method in methods)
|
||||
{
|
||||
|
@ -89,9 +88,8 @@ namespace XmlRpcHandler
|
|||
}
|
||||
XMLwrt.Flush();
|
||||
XMLwrt.Close();
|
||||
str.Close();
|
||||
string requestContent = File.ReadAllText(requestXmlPath);
|
||||
return Encoding.UTF8.GetBytes(requestContent);
|
||||
return ms.ToArray();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Decode response then return the values
|
||||
|
|
Loading…
Reference in a new issue