Git Product home page Git Product logo

musicalchair's Issues

Store answers to daily questions

Create a daily question playlist

  • The first response with music from the user for that day will be added
  • Limited to same day answers only

Add track metadata

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', '')
            }
        ]
    }

app_home_opened initial functionality

A meaningful home page when the user visits the app.

Messages like:

  • You are currently in the rotation pool and are 7% likely to be chosen next
  • You are not currently in the rotation pool, you can always opt-back in.

Functionality required:

  • opt-in/opt-out
    Just add to permanent exclusions if opted out, if user is not in exclusions, they are in the pool.

Create playlists

Create different playlists using the metadata saved with the media - dependent on #18

  • Genre playlists
  • Everything playlist
  • All playlists linked by users

Could be future conceptual playlists:

  • 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.

Make opting in and out use a set

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.

Dynamic cron schedules

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

Welcome DM on channel join

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

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency python-multipart to v0.0.9

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

docker-compose
docker-compose.yaml
dockerfile
Dockerfile
  • python 3.11-slim
pip_requirements
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
terraform/main.tf

  • Check this box to trigger a request for Renovate to run again on this repository

OAuth on non-slack endpoints

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.

Act on new users joining

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

Exclude other bot users from the pool

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"]]

Admin configure section

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

  • #25

  • Daily question channel(s)

  • Music scan channel(s), enabling auto reaction to music posts

  • Daily question missed questions

    • enabled/disabled
    • answer timeframe
    • reminders

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.