From fda174816d9794d490f5f7cae8791fbb803e8aaf Mon Sep 17 00:00:00 2001 From: Stefan Date: Sat, 8 Feb 2020 10:25:35 +0100 Subject: [PATCH 1/3] Fix playlist name display and playlist selection (fix #490) --- VocaluxeLib/Menu/CMenuPartySongSelection.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/VocaluxeLib/Menu/CMenuPartySongSelection.cs b/VocaluxeLib/Menu/CMenuPartySongSelection.cs index 815d4ded..41ecd0b6 100644 --- a/VocaluxeLib/Menu/CMenuPartySongSelection.cs +++ b/VocaluxeLib/Menu/CMenuPartySongSelection.cs @@ -100,6 +100,8 @@ namespace VocaluxeLib.Menu protected int NumMinMedleySongs = 3; protected int NumMaxMedleySongs = 10; + private List _PlaylistIDs; + public override void Init() { base.Init(); @@ -188,6 +190,8 @@ namespace VocaluxeLib.Menu _SelectSlides[_SelectSlideSorting].AddValue(ss.ToString()); _SelectSlides[_SelectSlidePlaylist].Clear(); + _SelectSlides[_SelectSlidePlaylist].NumVisible = 1; // Make sure that only one playlist at a time will be displayed (or the names overlap) + _PlaylistIDs = CBase.Playlist.GetIds(); List playlists = CBase.Playlist.GetNames(); for (int i = 0; i < playlists.Count; i++) { @@ -220,7 +224,7 @@ namespace VocaluxeLib.Menu _SongMode = _SelectSlides[_SelectSlideSongMode].Selection; _Source = _SelectSlides[_SelectSlideSource].Selection; NumMedleySongs = NumMinMedleySongs + _SelectSlides[_SelectSlideNumMedleySongs].Selection; - Playlist = _SelectSlides[_SelectSlidePlaylist].Selection; + Playlist = _PlaylistIDs[_SelectSlides[_SelectSlidePlaylist].Selection]; if (_SelectSlides[_SelectSlideSorting].Selection != _Sorting) { From ce5dabc849a02dc4559cb7b43e66beb0132290c8 Mon Sep 17 00:00:00 2001 From: Stefan Date: Sat, 8 Feb 2020 10:27:49 +0100 Subject: [PATCH 2/3] Add possibility to get playlist ids --- VocaluxeLib/IBasic.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/VocaluxeLib/IBasic.cs b/VocaluxeLib/IBasic.cs index e182273b..ad09e6a2 100644 --- a/VocaluxeLib/IBasic.cs +++ b/VocaluxeLib/IBasic.cs @@ -304,6 +304,7 @@ namespace VocaluxeLib { bool Exists(int playlistID); string GetName(int playlistID); + List GetIds(); List GetNames(); void SetName(int playlistID, string name); @@ -336,4 +337,4 @@ namespace VocaluxeLib bool IsPlaying(); float GetLength(); } -} \ No newline at end of file +} From 61be47ace136bd0e05b1b87a4f9cbf33b8b0a8bf Mon Sep 17 00:00:00 2001 From: Stefan Date: Sat, 8 Feb 2020 10:28:55 +0100 Subject: [PATCH 3/3] Add possibility to request playlist ids --- Vocaluxe/Base/CMain.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Vocaluxe/Base/CMain.cs b/Vocaluxe/Base/CMain.cs index 0689ccba..89824b8b 100644 --- a/Vocaluxe/Base/CMain.cs +++ b/Vocaluxe/Base/CMain.cs @@ -964,6 +964,11 @@ namespace Vocaluxe.Base CPlaylists.SetName(playlistID, name); } + public List GetIds() + { + return CPlaylists.Ids; + } + public List GetNames() { return CPlaylists.Names; @@ -1044,4 +1049,4 @@ namespace Vocaluxe.Base return CPlaylists.ContainsSong(playlistID, songID); } } -} \ No newline at end of file +}