mjmammoth / musicalchair Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
Tokens should be auto-rotated, not even stored as gcs secrets as they are currently.
May be dependent on OAuth stuff.
Create a daily question playlist
Figure out where the current limitations are in speed.
Especially when opt-in/out buttons are clicked.
Pull media artist, name, genres.
Will have to cater for (plan a way forward for)
Individual song links
Full album links
Playlist links
Artist/channel links
As both Spotify and Youtube support this functionality, even if we only want individual songs, the rest need to be filtered out.
Get the 'other' platform's URL for the same song.
Store data in the Firestore song collection, each posted link being a media item.
Might warrant the collection being called a 'media' collection as we could add a link_type to it too. (track/album/playlist/artist)
Possible structure, expansion of what's already in src/features/playlist_handler.py
:
media_data = {
"link_type": "track",
"original_source": "youtube" if "youtube" in url else "spotify",
"youtube_url": url if "youtube" in url else "",
"spotify_url": url if "spotify" in url else "",
"metadata": {
"genre": [],
"artist": "",
"song_name": "",
"album": ""
},
"posts": [
{
"date": event.get('ts', ''),
"user_id": event.get('user', '')
}
]
}
A meaningful home page when the user visits the app.
Messages like:
Functionality required:
Create different playlists using the metadata saved with the media - dependent on #18
Friday playlists
Seasonal playlists
Geography playlists
Convert platform playlists to other
Playlists should be created in both Spotify and Youtube.
Interaction with the bot should be possible to get the playlists, probably a slash command.
It is currently possible for users to click opt-in or opt-out multiple times before the ack response comes back, and for each time clicked - the user gets added/excluded an extra time.
To enable app admins to set their own scheduled time for the message, we need to be able to dynamically set the cron schedule.
Could continue to use cloud scheduler.. will need to figure how the post can be multi-tenanted
When a user joins a channel where MusicalChair daily question is active, the should be DM'd with the option to do whatever the opposite of the default setting is.
Opt-in or opt-out
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates are currently rate-limited. Click on a checkbox below to force their creation now.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
docker-compose.yaml
Dockerfile
python 3.11-slim
src/requirements.txt
aiohttp ==3.8.4
fastapi ==0.95.0
google-api-python-client ==2.84.0
google-cloud-firestore ==2.11.0
google-cloud-run ==0.7.1
google-cloud-storage ==2.8.0
Jinja2 ==3.1.2
python-multipart ==0.0.6
slack-bolt ==1.17.0
uvicorn ==0.21.1
terraform/main.tf
Endpoints that aren't authenticated by Slack's signing secret methodology need to be authenticated by OAuth.
These endpoints (/ask-for-song
, /backfill--playlists
) are currently available publicly and could be abused with the lack of authentication currently on them.
Should figure out what the interaction with Slack's OAuth is like as well as that is required to distribute the app eventually.
In conjunction with #26, when a legitimate new user joins a channel, show them the status of if they are in the question pool or not and give them the option to opt-in/out
Currently, the random member from the channel chosen can be another slack bot which is undesirable.
When MusicalChair is added to a channel, it should scan for bot users using the users_info method of the slack_bolt
sdk and add those bot users to the permanent exclusions state. This would also require for new members added to the channel to be acted upon, checking if it is a bot or not.
This should help achieve the desired outcome:
non_bot_members = [member for member in members if not client.users_info(user=member)["user"]["is_bot"]]
Need a way to configure which channels are included
CHANNEL_ID should not be an environment variable
firestore state document should hold which channels have what functionality
Scheduled questions days and time of day should be configurable, will need to revisit the cron functionality to see how it can be made dynamic
Handle timezone as well
Daily question channel(s)
Music scan channel(s), enabling auto reaction to music posts
Daily question missed questions
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.