From a1544bc1c8c9955766a6e7fc0b29487717adf000 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C2=B0Kelvin=20R?= Date: Sun, 9 Jul 2017 14:31:46 +0200 Subject: [PATCH] Repo in one folder, typos + additions, better layout (#105) * fix #100 * typos and additions * better layout for playlists * typo typo and some changes * was in the wrong line * also changed path to avconv.exe --- README.md | 14 +++++++------- core/convert.py | 4 ++-- spotdl.py | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 2217723..37e6822 100755 --- a/README.md +++ b/README.md @@ -60,19 +60,19 @@ If it does not install correctly, you may have to build it from source. For more Assuming you have Python already installed.. -- Download FFmpeg for windows from [here](http://ffmpeg.zeranoe.com/builds/). Copy `ffmpeg.exe` from bin folder (of FFmpeg) to Scripts folder (in your python's installation directory). +- Download FFmpeg for Windows from [here](http://ffmpeg.zeranoe.com/builds/). Copy `ffmpeg.exe` from `ffmpeg-xxx-winxx-static\bin\ffmpeg.exe` to `Scripts` folder (in your Python's installation directory: `Pythonxx\Scripts\ffmpeg.exe`) -- Download the zip file of this repository and extract its contents in your python's installation folder. +- Download the [zip file](https://github.com/ritiek/spotify-downloader/archive/master.zip) of this repository and copy the folder contained in the archive into your Python's installation folder (`\Python36\spotify-downloader-master`). -- Change your current working directory to python's installation directory. Shift+right-click on empty area and open cmd and type: +- Open the folder from last step. Shift+right-click on empty area, open `cmd` and type: -`"Scripts/pip.exe" install -U -r requirements.txt` + `"Scripts/pip.exe" install -U -r requirements.txt` -- If you do not want to naviagte to your python folder from the command-line everytime you want to run the script, you can have your python 'PATH' environment variables set and then you can run the script from any directory. +- If you do not want to naviagte to your Python folder from the command-line everytime you want to run the script, you can have your Python 'PATH' environment variables set and then you can run the script from any directory. ## Instructions for Downloading Songs -- For all available options, run `python spotdl.py --help` (or for windows run `python.exe spotdl.py --help`). +- For all available options, run `python spotdl.py --help` (or for Windows run `python.exe spotdl.py --help`). ``` usage: spotdl.py [-h] (-s SONG | -l LIST | -u USERNAME) [-n] [-m] [-f] [-v] @@ -147,7 +147,7 @@ http://open.spotify.com/track/64yrDBpcdwEdNY9loyEGbX #### Downloading playlists -- You can also load songs from any playlist provided you have spotify username of that user. +- You can also load songs from any playlist provided you have a Spotify username or user id of that user. (Open profile in Spotify, click on the three little dots below name, "Share", "Copy to clipboard", paste last numbers into command-line: `https://open.spotify.com/user/0123456790`) - Try running `python spotdl.py -u `, it will show all your public playlists. diff --git a/core/convert.py b/core/convert.py index bef2714..2e7e41d 100644 --- a/core/convert.py +++ b/core/convert.py @@ -22,7 +22,7 @@ def song(input_song, output_song, avconv=False, verbose=False): def convert_with_avconv(input_song, output_song, verbose): """Convert the audio file using avconv.""" if os.name == 'nt': - avconv_path = 'Scripts\\avconv.exe' + avconv_path = '..\\Scripts\\avconv.exe' else: avconv_path = 'avconv' @@ -53,7 +53,7 @@ def convert_with_ffmpeg(input_song, output_song, verbose): """ if os.name == "nt": - ffmpeg_pre = 'Scripts\\ffmpeg.exe ' + ffmpeg_pre = '..\\Scripts\\ffmpeg.exe ' else: ffmpeg_pre = 'ffmpeg ' diff --git a/spotdl.py b/spotdl.py index 12cd2ab..e02a798 100755 --- a/spotdl.py +++ b/spotdl.py @@ -130,7 +130,7 @@ def feed_playlist(username): # in rare cases, playlists may not be found, so playlists['next'] # is None. Skip these. Also see Issue #91. if playlist['name'] is not None: - print(u'{0}. {1} ({2} tracks)'.format( + print(u'{0:>5}.| {1:<30} | ({2} tracks)'.format( check, misc.fix_encoding(playlist['name']), playlist['tracks']['total'])) links.append(playlist)