(&mut self)
| 528 | |
| 529 | #[tracing::instrument(level = "debug", skip(self))] |
| 530 | pub fn clear_queue_except_current(&mut self) { |
| 531 | let current_song = self.get_current_song(); |
| 532 | |
| 533 | let only_one_song = self.get_queue().song_queue.len() == 1; |
| 534 | self.data.queue.song_queue.clear(); |
| 535 | self.data.queue.current_index = 0; |
| 536 | |
| 537 | if !only_one_song { |
| 538 | if let Some(current_song) = current_song { |
| 539 | self.add_to_queue(vec![current_song]); |
| 540 | } |
| 541 | } |
| 542 | |
| 543 | self.update_current_song(false); |
| 544 | self.dump_store(&[DumpType::QueueData, DumpType::SongQueue]); |
| 545 | } |
| 546 | |
| 547 | #[tracing::instrument(level = "debug", skip(self, key))] |
| 548 | pub fn blacklist_player(&mut self, key: String) { |
no test coverage detected