mathenz / goffy

A command-line tool for downloading public playlists, albums and individual tracks via Spotify URLs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

goffy

A command-line tool for downloading public playlists, albums and tracks to your computer or mobile device via Spotify URLs.

Downloads are not done directly from Spotify, but from YouTube (if a song matches).

goffy does not use any official API, but its own unofficial "API" (light and rustic). Additionally, it has no features related to the private data of your Spotify account. Lastly, you can save the music on your computer or mobile device (this makes more sense).

Alt text

Features

  • Download a playlist (publics only)
  • Download an album
  • Download a single track
  • Download multiple tracks from a txt file

Requirements

  • FFmpeg (required to add metadata to audio files)

Installation

Install by downloading latest release.

Or running:

go install github.com/mathenz/goffy@latest

If a version earlier than the latest one (v1.1.1) was installed, replace "latest" with "v1.1.1" in the previous command.

Usage

Download music to your local machine

goffy [option] [url] -d [path/to/musicfolder/]

Download music to your mobile device

goffy -m [option] [url]

In case you want to download multiple tracks from a text file, simply change [url] to [path/to/songs.txt]

To correctly read all tracks from a text file, place the URL of each track on its own line.

Options

-p,  download a playlist
-a,  download an album
-t,  download a single track
-f,  download multiple tracks from a text file

On mobile devices? How does it work?

Very simple. The music will be stored in a temporary directory on the local machine, then that folder is compressed and presented at the address <YOUR_HOSTMACHINE_IP>:8080. You, from your mobile device, will access from the browser and get the music. Afterwards, both the temporary folder and the zip file will be deleted.

Examples

  • If you want to save the music on your local machine:
    goffy -p https://open.spotify.com/playlist/37i9dQZF1EIh4XfqZs7jCB?si=5855691d6a874444 -d /path/to/musicfolder/
    
    goffy -a https://open.spotify.com/album/6Ym9q86JqAa4yi6BDaO35H?si=_Jcjf0sFTFuVCTSj0XYhcw -d /path/to/musicfolder/
    
    goffy -t https://open.spotify.com/track/5WSqNyypJ0hITVpvJMetqQ?si=5d9759cc4d8d4e57 -d /path/to/musicfolder/
    
    goffy -f /path/to/songs.txt -d /path/to/musicfolder/
    
  • Or if you want to save the music on your mobile device:
    goffy -m -p https://open.spotify.com/playlist/37i9dQZF1EIh4XfqZs7jCB?si=5855691d6a874444
    
    goffy -m -a https://open.spotify.com/album/6Ym9q86JqAa4yi6BDaO35H?si=_Jcjf0sFTFuVCTSj0XYhcw
    
    goffy -m -t https://open.spotify.com/track/5WSqNyypJ0hITVpvJMetqQ?si=5d9759cc4d8d4e57
    
    goffy -m -f /path/to/songs.txt
    

To obtain the url of a playlist, an album or a track, just click on the three dots > Share > Copy-Link-to-Playlist / Copy-Album-Link / Copy-Song-Link

Contributing

Feel free to open a pull request to:

  • Fix bugs
  • Suggest improvements

About

A command-line tool for downloading public playlists, albums and individual tracks via Spotify URLs.

License:GNU General Public License v3.0


Languages

Language:Go 100.0%