diff --git a/LibMpcApp/Program.cs b/LibMpcApp/Program.cs index eba6300..4cdf2b2 100644 --- a/LibMpcApp/Program.cs +++ b/LibMpcApp/Program.cs @@ -14,17 +14,29 @@ namespace LibMpcApp var connected = mpc.ConnectAsync().GetAwaiter().GetResult(); if (connected) { + Console.WriteLine("Connected to MPD."); StartReadCommands(mpc); } else { - Console.WriteLine("Could not connect to MPD"); + Console.WriteLine("Could not connect to MPD."); } + + mpc.DisconnectAsync().GetAwaiter().GetResult(); } private static void StartReadCommands(Mpc mpc) { - + while(true) + { + Console.Write("Command: "); + var command = Console.ReadLine(); + + if (string.IsNullOrEmpty(command)) + { + break; + } + } } } }