Coder Social home page Coder Social logo

autoplaylist's Introduction

AutoPlaylist

Automatically create playlists based on predicate.

Getting started

With Docker

Spotify API credentials are required to run the services. You need to set the following environment variables:

  • SPOTIFY_CLIENT_ID
  • SPOTIFY_CLIENT_SECRET

You can run the services with the following command:

docker compose --profile main up -d

With cargo

See CONTRIBUTING.md.

Concepts

Predicate

The predicate is a statement to filter tracks.

Source

A source is a track list on which apply a predicate to filter them. It can be shared between several playlists. A source can be:

  • the saved tracks of the user (Liked Songs)
  • a Spotify playlist

Target

A target is the platform on which create the playlist. A target can be:

  • Spotify

Synchronization flow

  1. Fetch the tracks from the playlist source
  2. Start synchronization of all playlists based on this source:
    1. Fetch the tracks from the playlist target
    2. For each track of the source, if it matches the playlist predicate, add it to the target
    3. For each track of the target, if it doesn't match the playlist predicate, remove it from the target

Note a synchronization can be triggered manually via the REST API by an admin.

Architecture

AutoPlaylist is composed of 2 services:

  • API which exposes the REST API to manage the playlists
  • Synchronizer which synchronizes the playlists

Contributing

See CONTRIBUTING.md.

autoplaylist's People

Contributors

leroyguillaume avatar

Watchers

 avatar

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.