Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A command that removes duplicate songs from the queue #91

Open
3eif opened this issue Dec 19, 2021 · 6 comments
Open

A command that removes duplicate songs from the queue #91

3eif opened this issue Dec 19, 2021 · 6 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@3eif
Copy link
Owner

3eif commented Dec 19, 2021

No description provided.

@3eif 3eif added enhancement New feature or request good first issue Good for newcomers labels Dec 19, 2021
@Shlok1999
Copy link

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

@3eif
Copy link
Owner Author

3eif commented Dec 19, 2021

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

Sure! Let me know if you need any help.

@rajamoulimallareddy
Copy link
Contributor

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```

@3eif
Copy link
Owner Author

3eif commented Feb 7, 2022

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

Any updates on this?

@rajamoulimallareddy
Copy link
Contributor

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

Any updates on this?

the above code works fine

@3eif
Copy link
Owner Author

3eif commented Feb 8, 2022

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

Any updates on this?

the above code works fine

Make a PR...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants