Change .login.auth to .env unique file

This commit is contained in:
poka 2022-05-07 13:54:48 +02:00
parent b92d101a8c
commit 297c836fdd
6 changed files with 11 additions and 11 deletions

View File

@ -1,2 +1,8 @@
output="$HOME"
# Authentification
sp_id=""
sp_password=""
sp_token=""
# Tracks format and location
output="$HOME/music"
format="{artist} - {track_name}.{ext}"

3
.gitignore vendored
View File

@ -1,3 +1,2 @@
lib/*
.login.auth
lib/
.env

View File

@ -1,3 +0,0 @@
sp_id=""
sp_password=""
sp_token=""

View File

@ -3,8 +3,7 @@
This is not a youtube scrapper. This is a real Spotify music downloader, to mp3 320kb/s 44100 Hz, no DRM, with good tags.
**You will need a premium account to Spotify and set your ids in `.login.auth` file.**
You should also edit `.env` file to configure your tracks output format and location.
**You will need a premium account to Spotify and set your ids in `.env` file,** and configure your tracks output format and custom location.
If you want to use keywords search, you will also need a developer token, set to the same file (TODO: bypass this token).
You can get this token here: https://developer.spotify.com/console/get-search-item/, but this one expire after one hour...

View File

@ -17,8 +17,7 @@ wget -q -O - https://apt.mopidy.com/mopidy.gpg | sudo apt-key add - #add mopidy'
sudo wget -q -O /etc/apt/sources.list.d/mopidy.list https://apt.mopidy.com/stretch.list #valid for Debian Stretch.
sudo apt update && sudo apt install libspotify12 libspotify-dev python-spotify #install libspotify from mopidy's repository
mkdir -p lib
[[ ! -f .login.auth ]] && cp .login.auth.template .login.auth && chmod 600 .login.auth
[[ ! -f .env ]] && cp .env.template .env
[[ ! -f .env ]] && cp .env.template .env && chmod 600 .env
git clone https://github.com/lavolp3/spotify-ripper.git lib/spotify-ripper && cd lib/spotify-ripper && python setup.py install
pyenv rehash

View File

@ -1,8 +1,8 @@
#!/bin/bash
[[ ! $1 ]] && echo "Please give a search" && exit 1
source .login.auth
source .env
mkdir -p "$output"
track=$(echo "$@" | sed 's/ /%20/g ')