Open aikaterna opened 10 months ago
Hey! I would love to work on this! Thank you
I was wondering if the project manager could assign me this issue? Thanks!
@sxliang3093, You are free to create a PR for any issue labeled as "Accepted" or "PRs welcome". We don't generally assign people to issues outside of core contributors. When we don't have a great line of communication with a contributor and don't have a PR already created, we don't know if/when they decide to abandon working on the issue. If you create a PR, it will be linked to this issue to make it clear that it is in active development, and we can see the progress towards fixing this issue. Feel free to label your PR as a draft if you have not yet fully resolved this issue.
If you need any additional help contributing, feel free to reach out in our discord support server.
What Red version are you using?
3.5.5
Cog name
Audio
Command name
autoplay
What did you expect to happen?
I expected a Red playlist saved with the User scope would be able to be used as an autoplay playlist.
What actually happened?
A User scoped playlist, set in [p]audioset autoplay playlist, is never started on bot start nor does [p]autoplay queue a song from that playlist.
In running in verbose mode, this traceback is offered on bot start or while using [p]autoplay.
User scoped playlists are saved in the SQL db as the user ID as the value in the scope_id column. However, when loading playlists with the get_playlist function, we are passing in the bot's ID instead of the playlist owner's user ID, which causes the lookup to fail on User scoped playlists.
https://github.com/Cog-Creators/Red-DiscordBot/blob/76abb7cab2c28bda3ad5e939b3d07250cdd99d7f/redbot/cogs/audio/apis/interface.py#L940
The autoplaylist config value we're looking at to start that get_playlist lookup only offers the playlist ID, so not sure if we should be doing another lookup at that point to fetch the true author instead of assuming it's the bot ID.
How can we reproduce this error?
Anything else?
Additional context: The fact that user playlists don't work for auto play is intentional - because auto play is a guild level feature meaning guild and global scoped playlists should work for it, but user not so, as we may exposing user data to users in a server that the playlist author/manager is no longer in. There should be an error show to the user when trying to set a user scoped playlist as an autoplay playlist.