Had to stop production as I ran out of copilot credits

This commit is contained in:
minster586
2026-08-15 04:11:52 -04:00
parent 65421eb379
commit 5838d4dcdd
5 changed files with 243 additions and 41 deletions
+9 -3
View File
@@ -313,9 +313,15 @@ namespace PainoBar_Helper
lock (_inputLock)
{
// Use LF explicitly to avoid CRLF handling issues with redirected stdin.
_inputWriter.Write(command);
_inputWriter.Write('\n');
// Convert to ASCII bytes with Unix LF to avoid StreamWriter text encoding issues
// that can cause Pianobar's C-runtime to see extra characters
byte[] bytes = System.Text.Encoding.ASCII.GetBytes(command + "\n");
// Write raw bytes directly to base stream, bypassing StreamWriter
_inputWriter.BaseStream.Write(bytes, 0, bytes.Length);
// Flush both base stream and StreamWriter buffers immediately
_inputWriter.BaseStream.Flush();
_inputWriter.Flush();
}