Skip to content

Commit

Permalink
Release v4.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
xnetcat authored Nov 6, 2022
2 parents 555c0fe + 6e0dd60 commit eec303e
Show file tree
Hide file tree
Showing 72 changed files with 39,527 additions and 209,087 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

- name: Run tests
run: |
poetry run pytest -vvv
poetry run pytest -vvv --ignore tests/test_matching.py
env:
PLATFORM: ${{ matrix.platform }}

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,4 @@ temp/

# VS Code
.vscode
*.txt
32 changes: 19 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,29 @@ Download your Spotify playlists and songs along with album art and metadata

</div>

> A new and improved version of spotDL: still the fastest, easiest and most accurate command-line music downloader
> A new and improved version of spotDL: still the fastest, easiest and most accurate
> command-line music downloader
---
______________________________________________________________________

**[Read the documentation on ReadTheDocs!](http://spotdl.rtfd.io/)**

---
______________________________________________________________________

## Prerequisites

- [Visual C++ 2019 redistributable](https://docs.microsoft.com/pl-pl/cpp/windows/latest-supported-vc-redist?view=msvc-170#visual-studio-2015-2017-2019-and-2022) **(on Windows)**
- [Visual C++ 2019 redistributable](https://docs.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170#visual-studio-2015-2017-2019-and-2022)
**(on Windows)**
- Python 3.7 or above (added to PATH)

> **_YouTube Music must be available in your country for spotDL to work. This is because we use YouTube Music to filter search results. You can check if YouTube Music is available in your country, by visiting [YouTube Music](https://music.youtube.com)._**
> **_YouTube Music must be available in your country for spotDL to work. This is because we use
> YouTube Music to filter search results. You can check if YouTube Music is available in your
> country, by visiting [YouTube Music](https://music.youtube.com)._**
## Installation

Refer to our [Installation Guide](https://spotdl.rtfd.io/en/latest/installation/) for more details

Refer to our [Installation Guide](https://spotdl.rtfd.io/en/latest/installation/) for more
details

- Python (**Recommended**)
- _spotDL_ can be installed by running `pip install spotdl`.
Expand All @@ -46,25 +50,27 @@ Refer to our [Installation Guide](https://spotdl.rtfd.io/en/latest/installation/
### Other options

- Prebuilt Executable
- You can download the latest version from the [Releases Tab](https://github.com/spotDL/spotify-downloader/releases)
- You can download the latest version from the
[Releases Tab](https://github.com/spotDL/spotify-downloader/releases)
- On Termux
- `curl -L https://raw.githubusercontent.com/spotDL/spotify-downloader/master/scripts/termux.sh | sh`
- Arch
- There is an Arch User Repository (AUR) package for [spotDL](https://aur.archlinux.org/packages/python-spotdl/).
- There is an Arch User Repository (AUR) package for
[spotDL](https://aur.archlinux.org/packages/python-spotdl/).
- Docker
- Build image:

```bash
docker build -t spotdl .
```

- Launch container with spotDL parameters (see section below). You need to create mapped volume to access song files
- Launch container with spotDL parameters (see section below). You need to create mapped
volume to access song files

```bash
docker run --rm -v $(pwd):/music spotdl download [trackUrl]
```


### Installing FFmpeg

If using FFmpeg only for spotDL, you can install FFmpeg to your local directory.
Expand Down Expand Up @@ -96,13 +102,13 @@ You can run _spotDL_ as a package if running it as a script doesn't work:
python -m spotdl [urls]
```

---
______________________________________________________________________

### Further information can be found in our documentation

**[Read the documentation on ReadTheDocs!](http://spotdl.rtfd.io/)**

---
______________________________________________________________________

## Contributing

Expand Down
54 changes: 6 additions & 48 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,24 +191,19 @@ git clone [your username]/spotify-downloader
cd spotify-downloader
```

(Optional) Create a virtual environment
**Install poetry**

```bash
python3 -m venv .venv
```
pip install poetry
```

Activate the virtual environment.
- Linux: `source .venv/bin/activate`
- Windows: `.venv\Scripts\activate`

> See [Python's official venv docs](https://docs.python.org/3/library/venv.html) for advanced virtual environment setup.
**Then, to install spotDL in-place and editable, run the following**

Then, to install spotDL in-place and editable, run the following
```
pip install -e .
poetry install
```

All changes will now affect the venv installation of the spotdl cli.
All changes will now affect the poetry installation of the spotdl cli.

### Linting, Formatting and Type-checking

Expand Down Expand Up @@ -325,43 +320,6 @@ Any submitted code is expected to have accompanying documentation
class B(A):
def test(self):
pass
# B.test.__doc__ acc. to normal python : None
# B.test.__doc__ acc. to normal pdoc3 : Docstring for A.
```

- You can write DocStrings for variables with `#:` comment above the variable

```
#: an example variable to demonstrate DocStrings
example_var_1 = 1
```

- You can use the reST directives
[`..math::`](https://docutils.sourceforge.io/docs/ref/rst/directives.html#math) and
[`..image::`](https://docutils.sourceforge.io/docs/ref/rst/directives.html#images)

#### Markdown formatting

- Markdown is formatted with [`mdformat-gfm`](https://pypi.org/project/mdformat-gfm/) and
indexes are auto-generated with [`mdformat-toc`](https://pypi.org/project/mdformat-toc/)

```
pip install mdformat-gfm mdformat-toc
```

- Create an Index using the following comment, the index will be updated when mdformat is run

```markdown
<!-- mdformat-toc start --no-anchors -->
```

- Preferably use empty lines between points on ordered & un-ordered lists

- Format your markdown using

```
mdformat --wrap 95 --number ./
```

### Overview of the Project Structure
Expand Down
32 changes: 19 additions & 13 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,29 @@ Download your Spotify playlists and songs along with album art and metadata
![Contributors](https://img.shields.io/github/contributors/spotDL/spotify-downloader?style=flat-square)
[![Discord](https://img.shields.io/discord/771628785447337985?label=discord&logo=discord&style=flat-square)](https://discord.gg/xCa23pwJWY)

> A new and improved version of spotDL: still the fastest, easiest and most accurate command-line music downloader
> A new and improved version of spotDL: still the fastest, easiest and most accurate
> command-line music downloader
---
______________________________________________________________________

**[Read the documentation on ReadTheDocs!](http://spotdl.rtfd.io/)**

---
______________________________________________________________________

## Prerequisites

- [Visual C++ 2019 redistributable](https://docs.microsoft.com/pl-pl/cpp/windows/latest-supported-vc-redist?view=msvc-170#visual-studio-2015-2017-2019-and-2022) **(on Windows)**
- [Visual C++ 2019 redistributable](https://docs.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170#visual-studio-2015-2017-2019-and-2022)
**(on Windows)**
- Python 3.7 or above (added to PATH)

> **_YouTube Music must be available in your country for spotDL to work. This is because we use YouTube Music to filter search results. You can check if YouTube Music is available in your country, by visiting [YouTube Music](https://music.youtube.com)._**
> **_YouTube Music must be available in your country for spotDL to work. This is because we use
> YouTube Music to filter search results. You can check if YouTube Music is available in your
> country, by visiting [YouTube Music](https://music.youtube.com)._**
## Installation

Refer to our [Installation Guide](https://spotdl.rtfd.io/en/latest/installation/) for more details

Refer to our [Installation Guide](https://spotdl.rtfd.io/en/latest/installation/) for more
details

- Python (**Recommended**)
- _spotDL_ can be installed by running `pip install spotdl`.
Expand All @@ -42,25 +46,27 @@ Refer to our [Installation Guide](https://spotdl.rtfd.io/en/latest/installation/
### Other options

- Prebuilt Executable
- You can download the latest version from the [Releases Tab](https://github.com/spotDL/spotify-downloader/releases)
- You can download the latest version from the
[Releases Tab](https://github.com/spotDL/spotify-downloader/releases)
- On Termux
- `curl -L https://raw.githubusercontent.com/spotDL/spotify-downloader/master/scripts/termux.sh | sh`
- Arch
- There is an Arch User Repository (AUR) package for [spotDL](https://aur.archlinux.org/packages/python-spotdl/).
- There is an Arch User Repository (AUR) package for
[spotDL](https://aur.archlinux.org/packages/python-spotdl/).
- Docker
- Build image:

```bash
docker build -t spotdl .
```

- Launch container with spotDL parameters (see section below). You need to create mapped volume to access song files
- Launch container with spotDL parameters (see section below). You need to create mapped
volume to access song files

```bash
docker run --rm -v $(pwd):/music spotdl download [trackUrl]
```


### Installing FFmpeg

If using FFmpeg only for spotDL, you can install FFmpeg to your local directory.
Expand Down Expand Up @@ -92,13 +98,13 @@ You can run _spotDL_ as a package if running it as a script doesn't work:
python -m spotdl [urls]
```

---
______________________________________________________________________

### Further information can be found in our documentation

**[Read the documentation on ReadTheDocs!](http://spotdl.rtfd.io/)**

---
______________________________________________________________________

## Contributing

Expand Down
33 changes: 21 additions & 12 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ spotDL is a free and open source tool that downloads your Spotify playlists & mu

> This is our recommended installation method.
If you are on Windows, Install Visual C++ Redistributible (link below) and then proceed to install Python & FFmpeg
If you are on Windows, Install Visual C++ Redistributible (link below) and then proceed to
install Python & FFmpeg

### Prerequisites to spotDL

- [Visual C++ 2019 redistributable](https://docs.microsoft.com/pl-pl/cpp/windows/latest-supported-vc-redist?view=msvc-170#visual-studio-2015-2017-2019-and-2022) (on Windows)
- [Visual C++ 2019 redistributable](https://docs.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170#visual-studio-2015-2017-2019-and-2022)
(on Windows)
- Python 3.7 or above (added to PATH)
- FFmpeg 4.2 or above (added to PATH)

Expand All @@ -26,9 +28,10 @@ When installing [Python](https://python.org/), ensure to select "**Add to PATH**

### Installing spotDL

> If you are not on Windows (e.g. OSX/UNIX), replace `pip` with `pip3` and `python` with `python3` in all commands.
> If you are not on Windows (e.g. OSX/UNIX), replace `pip` with `pip3` and `python` with
> `python3` in all commands.
Firstly, open a terminal. On Windows: Command Prompt, OSX: "Terminal", *UNIX: Bash or Zsh.
Firstly, open a terminal. On Windows: Command Prompt, OSX: "Terminal", \*UNIX: Bash or Zsh.

Verify you have installed Python correctly via `python -V`. Ensure you have v3.7 or greater.

Expand Down Expand Up @@ -57,17 +60,20 @@ If you require further help, ask in our [Discord Server](https://discord.gg/xCa2

### Download the executable

You can download the latest version from from the [Releases Tab](https://github.com/spotDL/spotify-downloader/releases)
You can download the latest version from from the
[Releases Tab](https://github.com/spotDL/spotify-downloader/releases)

### Running Web UI

Web UI will start by default if no arguments are passed to the command line (after double-clicking for example)
Web UI will start by default if no arguments are passed to the command line (after
double-clicking for example)

![Web UI](images/WEB_UI.png)

### Running the CLI

To use the command line interface just open your terminal and run `./spotdl-vX.X.X operation [urls]`
To use the command line interface just open your terminal and run
`./spotdl-vX.X.X operation [urls]`

## Docker Setup

Expand All @@ -83,13 +89,15 @@ Docker documentation: <https://docs.docker.com/>

- Build docker image `docker build -t spotdl .`
- List spotdl options: `docker run --rm spotdl --help`
- Download a song: `docker run --rm -v $(pwd):/music spotdl download https://open.spotify.com/track/0VjIjW4GlUZAMYd2vXMi3b`
- Download a song:
`docker run --rm -v $(pwd):/music spotdl download https://open.spotify.com/track/0VjIjW4GlUZAMYd2vXMi3b`

### Docker Hub Image

- Pull docker image from Docker hub: `docker pull spotdl/spotify-downloader`

- Download a song using Docker image: `docker run --rm -v $(pwd):/music spotdl/spotify-downloader download https://open.spotify.com/track/0VjIjW4GlUZAMYd2vXMi3b`
- Download a song using Docker image:
`docker run --rm -v $(pwd):/music spotdl/spotify-downloader download https://open.spotify.com/track/0VjIjW4GlUZAMYd2vXMi3b`

- Create a Docker container

Expand All @@ -103,7 +111,8 @@ docker create \
### Docker Compose

- Create a container using Docker Compose: `docker-compose up --no-start`
- Download a song using Docker compose: `docker-compose run --rm spotdl download https://open.spotify.com/track/0VjIjW4GlUZAMYd2vXMi3b`
- Download a song using Docker compose:
`docker-compose run --rm spotdl download https://open.spotify.com/track/0VjIjW4GlUZAMYd2vXMi3b`

## Other Installation Methods

Expand All @@ -120,8 +129,8 @@ We have a dedicated Termux installation script

spotDL downloads files to the folder where you ran spotDL from.

Open pwsh/powershell/cmd/terminal/similar in the folder you want files to download to, or
cd to desired folder.
Open pwsh/powershell/cmd/terminal/similar in the folder you want files to download to, or cd to
desired folder.

**Windows Shortcut:** Navigate to the folder you want the files to download to.
`SHIFT + RIGHT CLICK`, then select "Open PowerShell window here"
Expand Down
6 changes: 3 additions & 3 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ operable program or batch file.

### Solution

Ensure to add to PATH when installing:
![python install](https://i.imgur.com/jWq5EnV.png)
Ensure to add to PATH when installing: ![python install](https://i.imgur.com/jWq5EnV.png)

## spotdl: command not found

If you see this error after installing spotdl, that means that the bin (Binaries) folder is not on `$PATH`
If you see this error after installing spotdl, that means that the bin (Binaries) folder is not
on `$PATH`

### Solution

Expand Down
Loading

0 comments on commit eec303e

Please sign in to comment.