From 9695e98bbb0dc89d9e48491d633fb68d418f7842 Mon Sep 17 00:00:00 2001 From: Flamefire Date: Wed, 7 May 2014 20:20:44 +0200 Subject: [PATCH] Update display of no length --- VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs | 1 + VocaluxeLib/Menu/SongMenu/CSongMenuTileBoard.cs | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs b/VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs index b1106b7b..cc7f62b8 100644 --- a/VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs +++ b/VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs @@ -523,6 +523,7 @@ namespace VocaluxeLib.Menu.SongMenu if (song == null) return; + //TODO: Using prescan here causes Vocaluxe to hang a bit on loading the song but we need the length below int stream = CBase.Sound.Load(Path.Combine(song.Folder, song.MP3FileName), true, true); float startposition = song.Preview.StartTime; diff --git a/VocaluxeLib/Menu/SongMenu/CSongMenuTileBoard.cs b/VocaluxeLib/Menu/SongMenu/CSongMenuTileBoard.cs index e15be31d..1fef5094 100644 --- a/VocaluxeLib/Menu/SongMenu/CSongMenuTileBoard.cs +++ b/VocaluxeLib/Menu/SongMenu/CSongMenuTileBoard.cs @@ -137,7 +137,7 @@ namespace VocaluxeLib.Menu.SongMenu _Tiles[i].Selected = _Locked == i + _Offset; } - if (_Length < 0 && CBase.Sound.GetLength(_PreviewSongStream) > 0 && CBase.Songs.IsInCategory()) + if (_Length < 0 && CBase.Songs.IsInCategory() && CBase.Sound.GetLength(_PreviewSongStream) > 0) _UpdateLength(CBase.Songs.GetVisibleSong(_PreviewId)); } @@ -215,6 +215,8 @@ namespace VocaluxeLib.Menu.SongMenu _SongLength.Text = min.ToString("00") + ":" + sec.ToString("00"); _Length = time; } + else + _SongLength.Text = "..."; } public override void OnShow()