This program aims to build a lifetime-persistant personal favorites/collections/history management system in music, as a supplementary solution to the "isolated" media platforms like Spotify and iTunes. The core idea to achieve this is to build a unified Mapper database which maps music information across multiple media platforms with the support of APIs of Spotify and MusicBrainz. The goal is to build a music focused Personal Cloud that differs to Owncloud/Plex/SeaFile.
Trello Scrum Board: https://trello.com/b/FfMzYWKy/spoilfy-scrum-board
TODO:
- Design Database & ORM
- Quick implementation: ORM Data Insertion
- Spotify
- Accounts
- Tracks
- Albums
- Artists
- Playlists
- MusicBrainz
- Recordings
- Releases
- Artists
- Filesystem
- MP3 file
- Folder structure
- Spotify
- Quick implementation: Data Query
- Accounts
- Tracks
- Albums
- Artists
- Playlists
- Quick implementation: Web API
- Postman Test
- Spotify
- Authentication
- Retrieving
- Paging
- MusicBrainz
- Authentication
- Retrieving
- Quick implementation: Flask
- Quick implementation: Tagging (Auto-tagger)
- Spotify -> MusicBrainz
- Track
- Album
- Artist
- Local files -> MusicBrainz
- Spotify -> MusicBrainz
- Design Code Architecture
- Modularization
- Implement Models & Unit tests
- Create Frontend Pages
- Integrate Frontend & Backend
- Integration Test
- Deploy on Server
- Documentation
- Publish beta
Updates:
- Replace ID with URI in the format of:
<Group>:<Type>:<ID>
- Abandon most Foreign Keys to add flexibilities.
- Treat everything as a RESOURCE, and introduce a REFERENCE to connect.
The core idea is simple:
One real existence, can have multiple identities, or located in multiple providers.
In this case, the Real Existence
would be referred to Track / Album / Artist / Playlist
,
and they might exist with different identities: Spotify's resource, MusicBrainz's info, Local file...
- Music Player
- Display music library [playlists, artists, albums, songs, recommendations]
- Online stream music playing
? Personal Data Management
- Backup [playlists, liked songs, albums, artists]
- Save to database [sqlite]
- Export to local files [m3u, csv]
- Import from local data [m3u, csv, sqlite]
- Apply changes to Spotify
- Backup [playlists, liked songs, albums, artists]
- Media File Organizing
- Auto Tagging: take Spotify's as dominant, others as supplementaries.
- By folder structure
- By filename
- By existing tags
- By fingerprint
- File renaming
- Rename file
- Re-structure folder
- Auto Tagging: take Spotify's as dominant, others as supplementaries.
- Media File Sources
- Import From Local Files
- Only import recognizable files
- Group un-recognized files into one folder to be further processed
- Refer to Cloud drives: [Webdav, Google drive, AWS-S3]
- Refer to Spotify 30s preview file: "Spotify API"
- Refer to Youtube [albums, songs]: "Track Connectors"
- Refer to Search engines: "Piratebay"
- Import From Local Files
No need for Frontend design, it's supposed to be a completely copy from Spotify.
- Hosting: AWS Lightsail Ubuntu 16.04
- Language: Python + JS
- HTTP Server: Nginx + WSGI
- Application Framework: Django
- Databases: Postgresql + Redis + Sqlite
- DevOps: Bash scripts, Git, Travis CI, Docker, Ansible
- Utilities: Github Issues, Axure prototype
- Editors: Vim, Sublime Text, Visual Studio Code
- Business tools: Google Ads
https://stackshare.io/solomonxie/spoilfy
Root:
- Providers
- Spotify
- ORM
- API
- Mange
- MusicBrainz
- ORM
- API
- Manage
- Spotify
- Template
- Tracks
- Albums
- Artists
- Playlists
- Route.py
- Music Library (Spotify)
- Track:
[Display, Play, Add, Delete, Export, Sync, Import, Export]
- Albums:
[Display, Play, Add, Delete, Export, Sync, Export]
- Artists:
[Display, Play, Add, Delete, Export, Sync, Export]
- Playlists:
[Display, Play, Add, Delete, Update, Import, Export, Sync]
- Recent Played:
[Display, Play]
- Home:
[Display, Play]
- Browse:
[Display, Play]
- Recommends:
[Display, Play]
- Track:
- Dashboard (Management)
- Sync Library
- From Spotify:
[API Fetching]
- From Xiami
- From iTunes
- From Spotify:
- Local File Importation:
[Tagging, Relating]
- Cloud Drive Importation
- Webdav:
[Tagging, Relating]
- Google Drive:
[Tagging, Relating]
- Dropbox:
[Tagging, Relating]
- Webdav:
- Sync Library
Instead of directly extract data from database to Jinja2 Templates,
it's more flexible to make data as RESTful API
.
When the frontend requires some data, like an album, the program will first check whether the data already exists in the database on server. If not, it'll then request Spotify API, MusicBrainz API and other APIs. What it does next is doing both saving retrieved new data and also presenting it to the user.
This API only response data from CURRENT User Library. Data will be returned in JSON format.
BASE URL: http://music.solomonxie.top/spoilfy/api/v1
Entry points:
/tracks
: Return a list of user's Liked Tracks./artists
: Return a list of user's Followed Artists./albums
: Return a list of user's Saved Albums./playlist
: Return a list of user's Saved Playlists.
Init/Update User Library Flow:
@1 Fetch User full data from Spotify API
->@2 Process retried data
->@3 Save to Local Spotify Library
->@4 Cross searching MusicBrainz Library
@5 Save to User Library
.
User Library API:
- Client sends request ->
@1 API Entry point
->@2 Get LIST from User's library
->@3 Check information from Local Public Library for each item in the LIST
->@4 If not exists, RETRIEVE each item's data from Provider's Web API
->@5 Process retried data
->@6 Save to Local Public Library
->@7 Return to client
.
User flow:
- Import library ->
- Music Play or Manage
Tagging flow:
- Import files ->
- Tagging ->
- Relate to MusicBrainz ->
- Relate to Spotify