mirror of
https://github.com/IAmParadox27/jellyfin-plugin-media-bar.git
synced 2026-11-13 16:54:19 +01:00
Updated pipe path code to be platform agnostic.
This commit is contained in:
1 parent
69a5233b3e
commit
767be18e47
1 file changed
+5
-3
@@ -73,9 +73,11 @@ namespace Jellyfin.Plugin.MediaBar.Services
|
||||
}
|
||||
|
||||
string fileTransformationPipeName = "Jellyfin.Plugin.FileTransformation.NamedPipe";
|
||||
bool serverSupportsPipeCommunication = Directory.GetFiles(@"\\.\pipe\").Contains($@"\\.\pipe\{fileTransformationPipeName}");
|
||||
|
||||
if (serverSupportsPipeCommunication)
|
||||
MethodInfo? getPipePathMethod = typeof(PipeStream).GetMethod("GetPipePath", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
string? pipePath = getPipePathMethod?.Invoke(null, new object[] { ".", fileTransformationPipeName }) as string;
|
||||
string? pipeDirectory = Path.GetDirectoryName(pipePath);
|
||||
|
||||
if (Directory.Exists(pipeDirectory) && Directory.GetFiles(pipeDirectory).Contains(pipePath))
|
||||
{
|
||||
foreach (JObject payload in payloads)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user