EarTensifier icon indicating copy to clipboard operation
EarTensifier copied to clipboard

A command that removes duplicate songs from the queue

Open 3eif opened this issue 2 years ago • 6 comments

3eif avatar Dec 19 '21 03:12 3eif

Hey @Tetracyl, I would like to work on this issue

Shlok1999 avatar Dec 19 '21 12:12 Shlok1999

Hey @Tetracyl, I would like to work on this issue

Sure! Let me know if you need any help.

3eif avatar Dec 19 '21 15:12 3eif

Hey @Tetracyl, I would like to work on this issue

Sure! Let me know if you need any help.

        let oldtracks = dispatcher.queue
        let counter = 0;
        const newtracks = [];
        for (let i = 0; i < oldtracks.length; i++) {
            let exists = false;
            for (let j = 0; j < newtracks.length; j++) {
                if (oldtracks[i].info.uri === newtracks[j].info.uri) {
                    exists = true;
                    counter++;
                    break;
                }
            }
            if (!exists) {
                newtracks.push(oldtracks[i]);
            }
        }
        dispatcher.queue = newtracks```

rajamoulimallareddy avatar Dec 22 '21 17:12 rajamoulimallareddy

Hey @Tetracyl, I would like to work on this issue

Any updates on this?

3eif avatar Feb 07 '22 14:02 3eif

Hey @Tetracyl, I would like to work on this issue

Any updates on this?

the above code works fine

rajamoulimallareddy avatar Feb 08 '22 04:02 rajamoulimallareddy

Hey @Tetracyl, I would like to work on this issue

Any updates on this?

the above code works fine

Make a PR...

3eif avatar Feb 08 '22 04:02 3eif