MCPcopy Create free account
hub / github.com/Moosync/Moosync / remove_from_queue

Method remove_from_queue

src/store/player_store.rs:232–243  ·  view source on GitHub ↗
(&mut self, index: usize)

Source from the content-addressed store, hash-verified

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) {

Callers 2

MusicInfoMobileFunction · 0.80
MusicInfoFunction · 0.80

Calls 2

update_current_songMethod · 0.80
dump_storeMethod · 0.80

Tested by

no test coverage detected