Added README

pull/3/head
Jef Roosens 2021-04-30 01:54:24 +02:00
parent c5856964ed
commit 4789e52626
Signed by: Jef Roosens
GPG Key ID: B580B976584B5F30
2 changed files with 54 additions and 28 deletions

View File

@ -1,3 +1,55 @@
# backend
# Jos
The backend, written using Python and Flask.
Jos is one of my oldest project ideas, and the one that's definitely stuck
around the longest.
The idea is pretty straightforward: I like music, and I'd like to download any
music I want from YouTube using
[YoutubeDL](https://github.com/ytdl-org/youtube-dl)
([mirror](https://git.roosens.me/mirrors/youtube-dl)). I've written dozens of
scripts that automate some parts of this process, such as looking up the
correct video, or searching for metadata using the
[Spotify API](https://developer.spotify.com/documentation/web-api/). The goal
of this project is to be the final "script", housing everything I need to grow
my music collection.
## Design of the project
I've decided to create Jos using the classic frontend-backend combo: a backend
(written in Python using Flask) serves a RESTful API that does all the hard
work. We then put a lovely frontend in front of it (Vue 3) that interacts with
this API to make a functional website.
Ever since I had my Web Development course (taught by
[Ruben Verborgh](https://ruben.verborgh.org/)), I've been very interested in
developing high-performing and practical web applications using RESTful API's.
I know developing two separate applications requires more work, but it allows
for more flexibility, e.g. it allows me to swap out the backend for a
completely new implementation,
[in a different language](https://git.roosens.me/Chewing_Bever/fej).
## Plans
### API
* Search engine for high-quality music videos (using the `"auto-generated"`
trick.)
* Wrapper layer around the Spotify API for searching for tracks/albums/artists
* Return a JSON dump containing all metadata & urls you need to download a
track/album
This allows the API to be used by non-authenticated users as well (e.g. we
could write a Python client that uses the API, but downloads locally.)
* Download a track/album (should use some sort of authentification probably)
### Frontend
* Search for tracks/albums/artists
* Edit metadata & select best video
* Tell server to download track/album
* Live updates per track on how far the download is (or just wether or not
it's done)
* file explorer for music collection
* metadata editor for collection
* Analysis of existing collection
* Find incomplete albums & suggest missing tracks to download
* Detect invalid metadata

View File

@ -1,26 +0,0 @@
# Ideation
This file just serves as a central point for all the ideas I have for this
project.
## Used software/services
* Spotify API to look up album information
* YouTubeDL to download the videos
* Something to set the mp3 tags, not sure about this one yet
## API Design
### Endpoints
* `GET /search?q=`
* search for albums & tracks, given a search query
* returns a list of albums/tracks (basically the same as the API, just
cleaned up a bit)
* `GET /albums?ids=`: get detailed information about an album/a list of albums.
I'm not actually sure if I need this one.
* `GET /tracks?ids=`: get detailed information about a track/a list of tracks.
* `GET /tracks/videos?id=`: given a track, search YouTube for videos about the
track. Returns a list of youtube ids
* `POST /tracks/download`: download a track. The data should contain the wanted
metadata in the file & the id of the youtube video