Skip to content
/ musicapi Public

This project is supposed to track and schedule downloads of songs, albums/eps or an entire artists albums/eps from sources such as youtube.

License

Notifications You must be signed in to change notification settings

fsdmu/musicapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

musicapi

This project is intended to automatically handle the download of music from supported download handlers and store the url to the downloaded songs and albums in a database, thus preventing them from being downloaded multiple times. You can also download all albums and eps of an artist by providing the link to that artist. When toggling download future albums of an artist all future albums of that artist will be downloaded as well. To enable this feature you have to run a recurring job on the machine that calls the "auto_download_artist.py" script periodically.

The exact behavior could differ by handler to handler.

Intended Setup

The web service is supposed to be run on a machine with access to a supported download handler.

Supported Services

These are the lists of currently supported Services.

Download Handlers

Database Setup

All database providers that are compatible with SQLAlchemy are supported. By default, it connects to a MySQL database. This can be changed via the 'DB_DRIVER' environment variable. Refer to the official SQLAlchemy documentation.

Table Setup

Artist table with name 'artist'.

Column Type Constraints Default
id Integer Primary Key, Auto Increment -
url Varchar Unique, Not Null -
auto_download Boolean Not Null False

Album table with name 'album'.

Column Type Constraints Default
id Integer Primary Key, Auto Increment -
url Varchar Unique, Not Null -

Song table with name 'song'.

Column Type Constraints Default
id Integer Primary Key, Auto Increment -
url Varchar Unique, Not Null -

Usage

It is strongly recommended to run the script using the provided Dockerfile.

Environment Setup

Example .env file.

# Database Configuration
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=music_db
DB_USER=admin
DB_PASSWORD=securepassword
DB_DRIVER=mysql+mysqlconnector

# Handler Configuration
ME_TUBE_API_URL=http://metube:8081

Auto Download of Artists

To enable the automatic download of artists a recurring job needs to be run that calls the "auto_download_artist.py" script. The same environment setup as for the regular web service is necessary for this.

Releases

o.4.1

  • Improve ui design
  • Improve clean code for ui

0.4.0

  • Improve ui with help icon
  • Remove developer option for adding artist without download
  • Add option to select different audio formats
  • Update Table names for albums and songs
  • Add option to switch driver to a Database using an environment variable
  • Bugfixes
  • Update Documentation

License

This project is licensed under the GNU General Public License v3.0 (GPLv3).

You are free to use, modify, and distribute this software, including for commercial purposes, provided that any derivative work is also licensed under GPLv3 and the source code is made available.

About

This project is supposed to track and schedule downloads of songs, albums/eps or an entire artists albums/eps from sources such as youtube.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 3

  •  
  •  
  •