• Max Kellermann's avatar
    queue/PlaylistControl: keep order list consistency in MoveOrderToCurrent() · 91254e92
    Max Kellermann authored
    Our previous use of Queue::SwapOrders() could cause surprising
    results:
    
    - sometimes, the old "current" song would be played again (if the
      newly selected song had not been played already)
    
    - sometimes, the old "current" song would not be played again (if the
      newly selected song had already been played)
    
    This is inconsistent, because it should not depend on whether the
    newly selected song had already been played.
    
    So instead of Queue::SwapOrders() we now use Queue::MoveOrderAfter()
    and Queue::MoveOrderBefore(), which is more expensive, but also more
    consistent.  It attempts to retain as much from the previous order
    list as possible, and only moves the newly selected song around.
    91254e92
Name
Last commit
Last update
android Loading commit data...
doc Loading commit data...
m4 Loading commit data...
python/build Loading commit data...
scripts Loading commit data...
src Loading commit data...
systemd Loading commit data...
test Loading commit data...
win32 Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
README.md Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...
mpd.svg Loading commit data...
valgrind.suppressions Loading commit data...