From dd427e9c4761952b3749e8a20477790881ccee62 Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Sun, 2 Dec 2012 22:44:08 +0100 Subject: [PATCH] Use filename as title for bg-music from bg-music-folder. --- ...cense.txt => DJad - Walking Alone - License.txt} | 0 ...ackground track.mp3 => DJad - Walking Alone.mp3} | Bin Vocaluxe/Base/CBackgroundMusic.cs | 9 ++++++--- 3 files changed, 6 insertions(+), 3 deletions(-) rename Output/BackgroundMusic/{background track license.txt => DJad - Walking Alone - License.txt} (100%) rename Output/BackgroundMusic/{background track.mp3 => DJad - Walking Alone.mp3} (100%) diff --git a/Output/BackgroundMusic/background track license.txt b/Output/BackgroundMusic/DJad - Walking Alone - License.txt similarity index 100% rename from Output/BackgroundMusic/background track license.txt rename to Output/BackgroundMusic/DJad - Walking Alone - License.txt diff --git a/Output/BackgroundMusic/background track.mp3 b/Output/BackgroundMusic/DJad - Walking Alone.mp3 similarity index 100% rename from Output/BackgroundMusic/background track.mp3 rename to Output/BackgroundMusic/DJad - Walking Alone.mp3 diff --git a/Vocaluxe/Base/CBackgroundMusic.cs b/Vocaluxe/Base/CBackgroundMusic.cs index 17657e6a..44b39f27 100644 --- a/Vocaluxe/Base/CBackgroundMusic.cs +++ b/Vocaluxe/Base/CBackgroundMusic.cs @@ -120,7 +120,10 @@ namespace Vocaluxe.Base { get { - return _CurrentPlaylistElement.Artist + " - " + _CurrentPlaylistElement.Title; + if (_CurrentPlaylistElement.Artist != "" && _CurrentPlaylistElement.Title != "") + return _CurrentPlaylistElement.Artist + " - " + _CurrentPlaylistElement.Title; + else + return Path.GetFileNameWithoutExtension(_CurrentPlaylistElement.MusicFilePath); } } @@ -519,7 +522,7 @@ class PlaylistElement if (_Song != null) return _Song.Title; - return "Unknown"; + return ""; } } @@ -530,7 +533,7 @@ class PlaylistElement if (_Song != null) return _Song.Artist; - return "Unknown"; + return ""; } }