Skip to content

feat: add "Prevent duplicate tracks in queue" setting#985

Open
Phantomz10 wants to merge 8 commits into
ArchiveTuneApp:devfrom
Phantomz10:feature/prevent-duplicate-queue
Open

feat: add "Prevent duplicate tracks in queue" setting#985
Phantomz10 wants to merge 8 commits into
ArchiveTuneApp:devfrom
Phantomz10:feature/prevent-duplicate-queue

Conversation

@Phantomz10

Copy link
Copy Markdown

What this does

Adds a new toggle in Settings → Player & Audio called
"Prevent duplicate tracks in queue".

When enabled, adding a track that's already in the queue
will move it from its old position rather than adding a duplicate.

Changes

  • constants/PreferenceKeys.kt — added PreventDuplicateTracksInQueueKey
  • playback/MusicService.kt — duplicate removal logic in playNext() and addToQueue()
  • ui/screens/settings/PlayerSettings.kt — added SwitchPreference toggle
  • res/values/strings.xml — added English strings

Inspired by

This feature already exists in Metrolist (the upstream project
ArchiveTune is based on). This ports the same behavior.

Tested

Verified with a debug build — the toggle appears correctly and
duplicate removal works in both playNext and addToQueue scenarios.
6219970551900475773

@rukamori rukamori changed the base branch from main to dev July 5, 2026 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants