Files
SpotiFLAC-Mobile/lib/utils
zarzet 9dd2188aa1 feat(queue): add songs without queueing duplicates
A No duplicates in queue switch in a new Queue section of Playback
settings, off by default. While it is on, Add to queue, Play next and
adding many songs move an entry already coming up instead of queueing a
second copy, and a batch adds each song once, in its order. The song
playing and the songs before it are never touched, so they can be
queued again.

Identity is where a song plays from (`queueIdentityKey`), not its id or
tags: one file has different ids in the Library, the download history
and a plain path, while a FLAC and an MP3 copy share their tags and are
both meant to be queued. A `file://` URI counts as its path, a SAF
document is matched by provider and document id so a folder-tree URI of
it matches too, and `network://` sources (NAS, Subsonic, a paired
device) and CUE tracks name one song each. Stream URLs compare as is:
one with a fresh token never matches, which keeps a copy rather than
merging two songs.

Every path that adds to the queue goes through `enqueue` and
`enqueueAll`, so Link follows the playing device's own setting: songs a
phone queues on the computer, and a computer queueing a phone's songs
there. Autoplay already leaves out songs coming up and is unchanged.
The moved entry is removed without marking it dismissed for Autoplay,
and the shuffle order and play history follow the removal.
2026-11-08 16:33:35 +07:00
..