1.5.0 • Published 4 months ago

@nadim147/spdl v1.5.0

Weekly downloads
-
License
LGPL-3.0-only
Repository
github
Last release
4 months ago

SPDL

SPDL is a YouTube-DL (yt-dlp) based tool that allows you to download music while adding metadata from Spotify. It enhances your music library by pulling track information from Spotify and applying it to your downloaded music files. It also allows you to save you spotify playlist in folder/directory.

Requirements

Before using this tool, ensure you have the following prerequisites installed on your system:

  • Node: v21.0.0 or Higher. You can find it from here.
  • Yt-dlp: Ensure you have the latest version of Yt-dlp. You can find it on GitHub.
  • ffmpeg: Lastest or the minimum version required by yt-dlp. You can find it from here.

You can use various package managers to install these prerequisites. Here are some examples:

Windows:

Note: Winget isn't installed by default on windows 10. Run winget to check if it's installed or not. You can install it from Microsoft Store or GitHub.

# Using winget package manager
winget install -s winget nodejs ffmpeg yt-dlp

If you have python3 installed on your system use pip to install yt-dlp.]

pip3 install yt-dlp

Make sure to choose the appropriate package manager for your system to install these requirements.

Installation

Auto Installation:

To install spdl from npm run this following command.

You can also use yarn or pnpm if you prefer.

npm install -g @nadim147/spdl
spdl setup

Manual Installation:

To install manually, follow these steps:

  1. Clone the repository:

    git clone https://github.com/Nadim147c/SPDL.git
    cd SPDL
  2. Install all node with pnpm (npm i -g pnpm) package manager.

    pnpm install
  3. Build:

    pnpm build
  4. Linking:

    npm link
  5. Now, spdl command will be availble in your termnial. Run spdl --version to check the current version.

    Create Spotify app from Spotify API Deshboard. After that, Run spdl setup and it will prompt you to setup your Spotify API tokens.

Usage

Run spdl or spdl --help to get the help menu.

To download a track, run:

spdl [spotify_track_url]

To download a playlist, run: Only for public playlist

spdl [spotify_playlist_url]

Same is for albums. spdl [spotify_album_url] to download an album.

Here's some options that you can use when running spdl command.

-V, --verbose                Verbosity of loging when running command (default:
                             false)
--write-lrc                  Generate .lrc file for track if lyrics exists
                             (default: false)
-o, --output <Path>          Directory to download the tracks/playlists
                             (default: Current Directory)
-l, --search-limit <Amount>  Number of search to make before downloading avoid
                             track. More than 3 isn't recommanded (default:
                             first 3 tracks)
-s, --sleep-time <Seconds>   Amount of seconds to wait in between each track to
                             avoid getting limited. Changing it isn't
                             recommanded (default: 30)
--no-subdir                  Do not create sub directory for album and playlist

The most up-to-date and accurate information about parameters can be found in the built-in help menu (spdl --help). Any changes in command and their usage will be available there.

Commands

There is clear-cache command for clearing caches.

spdl clear-cache [options]

Note: You must use at least one option for clear-cache command.

Available options:

-V, --verbose  Verbosity of loging when running command (default:
               false)
--all          Remove all caches (default: false)
--images       Remove image caches (default: false)
--tracks       Remove track caches (default: false)
--albums       Remove album caches (default: false)
--playlists    Remove playlist caches (default: false)
--tokens       Remove token caches (default: false)

Issues and Contributions

If you encounter any problems, have questions, or need assistance with spdl, please feel free to create an issue. I'll try to help you with any issues or inquiries you might have.

While I aim to maintain this repository by myself, contributions are welcomed.

Note: I'm not a experienced js developer and coding style might be confusing.

To contribute, create an issue detailing the problem you'd like to address or the feature you'd like to add. This way, we can discuss and plan the changes. And also I'm using changesets and run pnpm changeset before you commit your changes.

For any questions or additional information, don't hesitate to reach out through the issues section.

License And Credits

This project isn't affilated with Spotify, Youtube and Kugou.

This project is licensed under GNU GPL-3.

Downloading lyrics from Kugou is implemented from z-huang/InnerTune.

1.5.0

4 months ago

1.4.1

4 months ago

1.4.0

4 months ago

1.3.1

4 months ago

1.3.0

4 months ago

1.2.0

4 months ago

1.2.1

4 months ago

1.1.0

4 months ago

1.0.2

4 months ago

1.0.1

5 months ago

1.0.0

5 months ago

0.6.1

5 months ago

0.6.0

5 months ago

0.5.0

5 months ago

0.4.3

5 months ago

0.4.2

6 months ago

0.4.1

6 months ago

0.4.0

6 months ago

0.3.0

6 months ago

0.2.1

6 months ago

0.2.0

6 months ago

0.1.3

7 months ago

0.1.2

7 months ago

0.1.0

7 months ago