Draw a separator between albums with the same name, but a different artist
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
* Fix crash on startup with Visualizer as the initial screen.
|
* Fix crash on startup with Visualizer as the initial screen.
|
||||||
* Fix crash on startup with Browser as the initial screen.
|
* Fix crash on startup with Browser as the initial screen.
|
||||||
* Show the Visualizer immediately if it's the initial screen.
|
* Show the Visualizer immediately if it's the initial screen.
|
||||||
|
* Draw a separator between albums with the same name, but a different artist.
|
||||||
|
|
||||||
# ncmpcpp-0.9 (2020-12-20)
|
# ncmpcpp-0.9 (2020-12-20)
|
||||||
* Fix various Mopidy specific bugs.
|
* Fix various Mopidy specific bugs.
|
||||||
|
|||||||
@@ -88,8 +88,14 @@ void setProperties(NC::Menu<T> &menu, const MPD::Song &s, const SongList &list,
|
|||||||
auto next = list.beginS() + drawn_pos + 1;
|
auto next = list.beginS() + drawn_pos + 1;
|
||||||
if (next != list.endS())
|
if (next != list.endS())
|
||||||
{
|
{
|
||||||
if (next->song() != nullptr && next->song()->getAlbum() != s.getAlbum())
|
if (next->song() != nullptr)
|
||||||
separate_albums = true;
|
{
|
||||||
|
// Draw a separator when the next album is different than the current
|
||||||
|
// one. In case there are two albums with the same name, but a different
|
||||||
|
// artist, compare also artists.
|
||||||
|
separate_albums = next->song()->getAlbum() != s.getAlbum()
|
||||||
|
|| next->song()->getArtist() != s.getArtist();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (separate_albums)
|
if (separate_albums)
|
||||||
|
|||||||
Reference in New Issue
Block a user