(&mut self, index: usize)
| 230 | |
| 231 | #[tracing::instrument(level = "debug", skip(self, index))] |
| 232 | pub fn remove_from_queue(&mut self, index: usize) { |
| 233 | self.data.queue.song_queue.remove(index); |
| 234 | if self.data.queue.current_index > index { |
| 235 | self.data.queue.current_index -= 1; |
| 236 | } |
| 237 | |
| 238 | if self.data.queue.current_index == index { |
| 239 | self.update_current_song(false); |
| 240 | } |
| 241 | |
| 242 | self.dump_store(&[DumpType::SongQueue, DumpType::QueueData]); |
| 243 | } |
| 244 | |
| 245 | #[tracing::instrument(level = "debug", skip(self, song, index))] |
| 246 | fn insert_song_at_index(&mut self, song: Song, index: usize, dump: bool) { |
no test coverage detected