Skip to main content

An extensive music downloader crawling the internet. It gets its metadata from a couple of metadata providers, and it scrapes the audiofiles.

Project description

Music Kraken

music kraken logo

Installation

You can find and get this project from either PyPI as a Python-Package, or simply the source code from GitHub. Note that even though everything SHOULD work cross-platform, I have only tested it on Ubuntu. If you enjoy this project, feel free to give it a star on GitHub.

# Install it with
pip install music-kraken

# and simply run it like this:
music-kraken

Dependencies

You will need to install these two programms.

  • pandoc

Notes for WSL

If you choose to run it in WSL, make sure ~/.local/bin is added to your $PATH #2

Quick-Guide

The Genre you define at the start is the folder, my programm will download the files into, AS WELL as the value of the ID3 genre field.

When it drops you into the shell 2 main things are important:

  1. You search with s: <query/url>
  2. You choose an option with just the index number of the option
  3. You download with d: <options/url>, where the options are comma seperated
  4. You support me by making a pr, or starring my repo.

Trust me it WILL make sense, once you see it.

Query

The syntax for the query is like really simple.

> s: #a <any artist>
searches for the artist <any artist>

> s: #a <any artist> #r <any releas>
searches for the release (album) <any release> by the artist <any artist>

> s: #r <any release> Me #t <any track>
searches for the track <any track> from the release <any relaese>

For a more detailed guid of the downloading shell, see here.

LOVE YALL (except nazis ;-;)


CONTRIBUTE

I am happy about every pull request. To contribute look here.

Matrix Space

I decided against creating a discord server, due to piracy communities get often banned from discord. A good and free Alternative are Matrix Spaces. I reccomend the use of the Client Element. It is completely open source.

Click this link (https://matrix.to/#/#music-kraken:matrix.org) to join.

TODO till the next release

These Points will most likely be in the changelogs.

  • Update the Documentation of the new cli.
  • Migrate away from pandoc, to a more lightweight alternative, that can be installed over PiPY.
  • Update the Documentation of the internal structure. (could be pushed back one release)

Programming Interface / Use as Library

This application is $100%$ centered around Data. Thus, the most important thing for working with musik kraken is, to understand how I structured the data.

Quick Overview

---
title: Quick Overview (outdated)
---
sequenceDiagram

participant pg as Page (eg. YouTube, MB, Musify, ...)
participant obj as DataObjects (eg. Song, Artist, ...)
participant db as DataBase

obj ->> db: write
db ->> obj: read

pg -> obj: find a source for any page, for object.
obj -> pg: add more detailed data from according page.
obj -> pg: if available download audio to target.

Data Model

The Data Structure, that the whole programm is built on looks as follows:

---
title: Music Data
---
erDiagram



Target {

}

Lyrics {

}

Song {

}

Album {

}

Artist {

}

Label {

}

Source {

}

Source }o--|| Song : ""
Source }o--|| Lyrics : ""
Source }o--|| Album : ""
Source }o--|| Artist : ""
Source }o--|| Label : ""

Song }o--o{ Album : AlbumSong
Album }o--o{ Artist : ArtistAlbum
Song }o--o{ Artist : "ArtistSong (features)"

Label }o--o{ Album : LabelAlbum
Label }o--o{ Artist : LabelSong

Song ||--o{ Lyrics : ""
Song ||--o{ Target : ""

Ok now this WILL look intimidating, thus I break it down quickly.
That is also the reason I didn't add all Attributes here.

The most important Entities are:

  • Song
  • Album
  • Artist
  • Label

All of them (and Lyrics) can have multiple Sources, and every Source can only Point to one of those Element.

The Target Entity represents the location on the hard drive a Song has. One Song can have multiple download Locations.

The Lyrics Entity simply represents the Lyrics of each Song. One Song can have multiple Lyrics, e.g. Translations.

Here is the simplified Diagramm without only the main Entities.

---
title: simplified Music Data
---
erDiagram

Song {

}

Album {

}

Artist {

}

Label {

}

Song }o--o{ Album : AlbumSong
Album }o--o{ Artist : ArtistAlbum
Song }o--o{ Artist : "ArtistSong (features)"

Label }o--o{ Album : LabelAlbum
Label }o--o{ Artist : LabelSong

Looks way more manageable, doesn't it?

The reason every relation here is a n:m (many to many) relation is not, that it makes sense in the aspekt of modeling reality, but to be able to put data from many Sources in the same Data Model.
Every Service models Data a bit different, and projecting a one-to-many relationship to a many to many relationship without data loss is easy. The other way around it is basically impossible

Data Objects

Not 100% accurate yet and might change slightly

Creation

# needs to be added

If you just want to start implementing, then just use the code example I provided, I don't care.
For those who don't want any bugs and use it as intended (which is recommended, cuz I am only one person so there are defs bugs) continue reading, and read the whole documentation, which may exist in the future xD

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

music_kraken-1.9.0.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

music_kraken-1.9.0-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

Details for the file music_kraken-1.9.0.tar.gz.

File metadata

  • Download URL: music_kraken-1.9.0.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for music_kraken-1.9.0.tar.gz
Algorithm Hash digest
SHA256 a671a4a5aacb02a9ee5674d63cf8480586bbdaba54e56ef4d0a362b91efb82a1
MD5 c41e91b2b8b17afc07852495de9767e9
BLAKE2b-256 f6bf5cddc4d49d5389dbb323168d462c1ecc653460365394780a774f82856f43

See more details on using hashes here.

File details

Details for the file music_kraken-1.9.0-py3-none-any.whl.

File metadata

  • Download URL: music_kraken-1.9.0-py3-none-any.whl
  • Upload date:
  • Size: 18.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for music_kraken-1.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a6f58ae076c3379e3f1a34fce1ad29b5c72f62356b83fd0a2c53dda4b940559f
MD5 d22bf330e3bcfa9093db2c43ad5e8394
BLAKE2b-256 2a22640b71b943d77a556f273e25c01f8758b108bccd05a6a865fe375f3c1403

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page