Draw a separator between albums with the same name, but a different artist

master
Andrzej Rybczak 5 years ago
parent 88025e2e93
commit 89ebfbf73d
  1. 1
      CHANGELOG.md
  2. 10
      src/display.cpp

@ -4,6 +4,7 @@
* Fix crash on startup with Visualizer as the initial screen.
* Fix crash on startup with Browser as 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)
* 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;
if (next != list.endS())
{
if (next->song() != nullptr && next->song()->getAlbum() != s.getAlbum())
separate_albums = true;
if (next->song() != nullptr)
{
// 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)

Loading…
Cancel
Save