mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-21 21:20:39 +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();
|
XmlWriterSettings sett = new XmlWriterSettings();
|
||||||
sett.Indent = true;
|
sett.Indent = true;
|
||||||
|
|
||||||
var requestXmlPath = Path.Combine(Path.GetTempPath(), "request.xml");
|
|
||||||
|
|
||||||
sett.Encoding = Encoding.UTF8;
|
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
|
// Let's write the methods
|
||||||
foreach (XmlRpcMethodCall method in methods)
|
foreach (XmlRpcMethodCall method in methods)
|
||||||
{
|
{
|
||||||
|
@ -89,9 +88,8 @@ namespace XmlRpcHandler
|
||||||
}
|
}
|
||||||
XMLwrt.Flush();
|
XMLwrt.Flush();
|
||||||
XMLwrt.Close();
|
XMLwrt.Close();
|
||||||
str.Close();
|
return ms.ToArray();
|
||||||
string requestContent = File.ReadAllText(requestXmlPath);
|
}
|
||||||
return Encoding.UTF8.GetBytes(requestContent);
|
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Decode response then return the values
|
/// Decode response then return the values
|
||||||
|
|
Loading…
Reference in a new issue