Skip to content

Don't add songs that are already in queue

From the commit:

Currently, songs, that are already in the queue, can still be added. These songs will be added at the end of the queue. When selected, the player jumps to the first song within the queue, leading to a weird behaviour.

Fix this by not allowing duplicated songs to be added. This is checked when the songs are about to be queued. Additionally, a toast containing the number of skipped songs is added.

Fixes: #248 (closed)

The contains function currently checks the song list iteratively. On my notebook with an i7-7700HQ and using the debug build, loading 1439 files with cached covers takes about 37s. It takes about 44s for adding another 1216 files with cached covers, in which looking for duplicates takes about 2s.

Edited by Martin Pobaschnig

Merge request reports