MCPcopy Create free account
hub / github.com/MusicPlayerDaemon/MPD / MoveOrderToCurrent

Method MoveOrderToCurrent

src/queue/PlaylistControl.cxx:43–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43unsigned
44playlist::MoveOrderToCurrent(unsigned old_order) noexcept
45{
46 if (!queue.random)
47 /* no-op because there is no order list */
48 return old_order;
49
50 if (playing) {
51 /* already playing: move the specified song after the
52 current one (because the current one has already
53 been playing and shall not be played again) */
54 return queue.MoveOrderAfter(old_order, current);
55 } else if (current >= 0) {
56 /* not playing: move the specified song before the
57 current one, so it will be played eventually */
58 return queue.MoveOrderBefore(old_order, current);
59 } else {
60 /* not playing anything: move the specified song to
61 the front */
62 return queue.MoveOrderBefore(old_order, 0);
63 }
64}
65
66void
67playlist::PlayPosition(PlayerControl &pc, int song)

Callers

nothing calls this directly

Calls 2

MoveOrderAfterMethod · 0.80
MoveOrderBeforeMethod · 0.80

Tested by

no test coverage detected