From 41afaca2b83c6a9ba2ba8429f06b01aa922c15f1 Mon Sep 17 00:00:00 2001 From: Alexander Eckart Date: Sun, 4 Mar 2012 16:37:59 +0100 Subject: [PATCH] do not load songs if the mp3 does not exists --- Vocaluxe/Lib/Song/CSong.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Vocaluxe/Lib/Song/CSong.cs b/Vocaluxe/Lib/Song/CSong.cs index 39c1d35f..1327363b 100644 --- a/Vocaluxe/Lib/Song/CSong.cs +++ b/Vocaluxe/Lib/Song/CSong.cs @@ -237,6 +237,11 @@ namespace Vocaluxe.Lib.Song this.MP3FileName = Value; HeaderFlags |= EHeaderFlags.MP3; } + else + { + CLog.LogError("Can't find audio file: " + Path.Combine(this.Folder, Value)); + return false; + } break; case "BPM": if (CHelper.TryParse(Value, out this.BPM)) @@ -283,6 +288,9 @@ namespace Vocaluxe.Lib.Song case "VIDEO": if (File.Exists(Path.Combine(this.Folder, Value))) this.VideoFileName = Value; + else + CLog.LogError("Can't find video file: " + Path.Combine(this.Folder, Value)); + break; case "VIDEOGAP": CHelper.TryParse(Value, out this.VideoGap);