.gitignore | ||
LICENSE | ||
ptgdp | ||
ptgdp-rofi | ||
ptgdp.conf | ||
README.md |
ptgdp: Play the Goddamned Playlist
A tool to play a plaintext playlist composed entirely of youtube-dl search queries or URLs
Installation
Put ptgdp
somewhere in $PATH
and install youtube-dl. Additionally, you need some implementation of pgrep
, which is probably already on your system, and Bash.
Quickstart
Make a file containing some download queries. For example:
myplaylist
nine inch nails play the goddamned part
alice in chains love hate love
megadeth high speed dirt
tool parabola
Then invoke ptgdp
:
ptgdp myplaylist
And that's basically it. See ptgdp -h
and the sections below for more info.
Configuration
Move ptgdp.conf
from this repo to ~/.config/ptgdp.conf
and change the values as you see fit. Alternatively, invoke ptgdp
with -c
and point it at your config file.
Return Codes
Code | Meaning |
---|---|
1 |
Syntax error |
50 |
Misconfigured backend |
51 |
Backend could not be set up (i.e. mpd failed to update) |
60 |
Playlist does not exist |
61 |
Playlist is unreadable |
Tips
-
ytsearch:
is only the default search. If a line is prefixed with another search type (ex.scsearch:dagoth ur fanfiction
), youtube-dl will respect it. -
You can use URLs if you want to.
-
You can comment a playlist file by prefixing the line with
#
.
FAQ
Q: Why?
A: I wanted to kick my dependence on Spotify while still having access to easy music. At first I just used YouTube, but after fighting their horrid suggestions system, I decided it probably wouldn't be too hard to use youtube-dl
to wrap it. Thus this tool was born.
Simple plaintext playlist files and a rofi script to queue them up with only a couple keystrokes seemed like a convenient enough implementation to me.
Q: Holy fuck ow my disk space
A: Songs are stored in ~/Music/PTGDP Songs. Clean it up if it gets too big; they'll be redownloaded as needed. Songs are cached both for offline usage and because YouTube searches aren't exactly the most consistent things over time.
On the bright side, though, youtube-dl downloads most songs in Opus, which has insane quality per byte.
Q: Why is your tool downloading the shitty "w/ lyrics" versions of songs with ass quality?
A: Because YouTube searches suck. That being said, they will also parse out descriptions, so you can stick the copyright text or something in your search query. Alternatively, find a good video and just stick the URL in your playlist.
Q: Why isn't my music player supported?
A: Open a bug report/pull request. Alternatively, use ptgdp -m
and some glue.
Bugs
- Because I haven't quite figured out how to into mpd sockets, this tool assumes that
$XDG_MUSIC_DIR
(~/Music
) is the root of your library when using the mpd backend.