* Set playlist position by set index. * @param set_index Set index to select. */
| 185 | * @param set_index Set index to select. |
| 186 | */ |
| 187 | void MusicSystem::SetPositionBySetIndex(uint set_index) |
| 188 | { |
| 189 | auto it = std::ranges::find(this->active_playlist, set_index, &PlaylistEntry::set_index); |
| 190 | if (it != std::end(this->active_playlist)) this->playlist_position = std::distance(std::begin(this->active_playlist), it); |
| 191 | } |
| 192 | |
| 193 | /** |
| 194 | * Get set index from current playlist position. |