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

Creator controls and queue management and Fix issue #49 #38

Merged
merged 15 commits into from
Sep 6, 2024

Conversation

Bot-Rakshit
Copy link
Contributor

#Description:

Added creator-specific controls:

Implemented an "Empty Queue" button for creators
Added a confirmation dialog for emptying the queue
Creators can now remove individual songs from the queue
Added rate limiting( not for creators):

Normal users will get rate limited, they can add only 2 songs per 2 minutes, and 5 songs in 10 minutes ( can be changed according to connivence)
3.Avoided Duplicate songs ( not for creators)

if the same song has been added in the last 10 minutes it throws an error to the user.

@hkirat
Copy link
Contributor

hkirat commented Aug 30, 2024

please add back the pnpm-lock
any reason u removed it?

@Bot-Rakshit
Copy link
Contributor Author

added it back

const res = await youtubesearchapi.GetVideoDetails(extractedId);

// Check if the user is not the creator
if (user.id !== data.creatorId) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I added this comment uin the other PR
creator should be able to add unlimited links to the queue

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

creator is able to add unlimited links to the queue, only a normal user is rate limited

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only applying rate limits and duplicity checks for !creator

@hkirat
Copy link
Contributor

hkirat commented Aug 30, 2024

Tag me for review when done @Bot-Rakshit

@Bot-Rakshit
Copy link
Contributor Author

@hkirat good for review, LGTM

@Bot-Rakshit
Copy link
Contributor Author

this pr also solves #49

@Bot-Rakshit Bot-Rakshit changed the title Creator controls and queue management Creator controls and queue management and Fix issue #49 Aug 31, 2024
} catch(e) {

const res = await fetch("/api/streams/empty-queue", {
method: "POST"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have used it here @hkirat

@hkirat
Copy link
Contributor

hkirat commented Sep 6, 2024

/bounty $100

@hkirat hkirat merged commit 1209309 into code100x:main Sep 6, 2024
1 check passed
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