From 305a9a4a980ae4436b2249dd2a6edde44d411e61 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Sun, 24 Jul 2016 13:00:34 +0200 Subject: [PATCH] better error when ffmpeg is not found --- NadekoBot/Modules/Music/Classes/Song.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/NadekoBot/Modules/Music/Classes/Song.cs b/NadekoBot/Modules/Music/Classes/Song.cs index 91c866e8..fc831b52 100644 --- a/NadekoBot/Modules/Music/Classes/Song.cs +++ b/NadekoBot/Modules/Music/Classes/Song.cs @@ -94,6 +94,16 @@ namespace NadekoBot.Modules.Music.Classes await p.StandardOutput.BaseStream.CopyToAsync(outStream, 81920, cancelToken); prebufferingComplete = true; } + catch (System.ComponentModel.Win32Exception) { + var oldclr = Console.ForegroundColor; + Console.ForegroundColor = ConsoleColor.Red; + Console.WriteLine(@"You have not properly installed or configured FFMPEG. +Please install and configure FFMPEG to play music. +Check the guides for your platform on how to setup ffmpeg correctly: + Windows Guide: https://goo.gl/SCv72y + Linux Guide: https://goo.gl/rRhjCp"); + Console.ForegroundColor = oldclr; + } catch (Exception ex) { Console.WriteLine($"Buffering errored: {ex.Message}");