Skip to content

ianare/music_flask

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

music_flask, the music downloader

Introduction

"music_flask" WEB application is what you need to make downloading youtube music easier !

Based on the Flask framework, it is entirely developped in Pyhton3.

Pre-requisites

Python3 pip3 Flask flask_wtf wtforms youtube_dl ffmpeg

Status

!! WORK IN PROGRESS !!

TODO

  • Add TLS support
  • Improve music files list design
  • Add audio balise to stream online
  • Add a way to delete musics
  • Improve and add more flash information
  • Find a way to add a progress-bar
  • Add youtube-dl progessinon informations too
  • Add a database simplistic system to store URL:file_name downloaded
  • Avoid downloading of an previously downloaded file still present in 'data'
  • A an API call to musicbrainz to retrieve tag informations and music names + update file with it.
  • Change download mechanism to be able to download in a async manner.async-io
  • Fill up the logger class
  • Add a check for the local disk available space before download. Print a warning icon when disk space is low.

Docker

Build it

You can build the docker image with the bash script included:

$ cd Docker/
$ bash -c ./build-image.sh

Start it

You must run it with user flask:

Please pay attention to the flag --rm
$ docker run -p 80:1080 -d --user flask -h musicFlask --name music_flask --rm music_flask:latest

If you want to manage the downloaded files on disk, you can mount the data directory into a volume with -v option:

$ mkdir $(pwd)/musics
$ docker run -p 80:1080 -d --user flask -h musicFlask --name music_flask -v $(pwd)/musics:/home/flask/music_flask/data --rm music_flask:latest

Manage it

  • show logs
  • attach to it
  • stop it
$ docker logs -f music_flask
$ docker exec -it music_flask sh
$ docker stop music_flask

Quickstart

Create a Python virtual environnement and then install Flask.

$ pip install Flask wtforms flask_wtf

Install youtube_dl

mkdir -p $PYTHONPATH/wheel/youtube_dl/
pushd $PYTHONPATH/wheel/youtube_dl/
curl -L "https://files.pythonhosted.org/packages/38/98/759cc271d2cda665671a835689b3fb5c5dcd6a3a3cdaf81164dd270cb263/youtube_dl-2018.4.16-py2.py3-none-any.whl" -O
popd
pip install youtube_dl

Now run the application

$ python3 ./music_flask.py

Informations

You can find youtube-dl python call options here Python'call options

About

WEB application is what you need to make downloading youtube music easier !

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 47.3%
  • HTML 34.5%
  • Shell 13.6%
  • JavaScript 3.3%
  • CSS 1.3%