| 41 | } |
| 42 | |
| 43 | unsigned |
| 44 | playlist::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 | |
| 66 | void |
| 67 | playlist::PlayPosition(PlayerControl &pc, int song) |
nothing calls this directly
no test coverage detected