Allows you to listen to Digitally Imported (legally, with paid subscription) in the console.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Steven Saus d56d5dfed8 messing with documentation 2 years ago
LICENSE Initial commit 8 years ago
README.md messing with documentation 2 years ago
icon.png Added in stream_to_mpd information and usage 2 years ago
listentoclassical Included using rofi as a picker 2 years ago
listentodi Included using rofi as a picker 2 years ago
listentoradio Included using rofi as a picker 2 years ago
listentorockradio Included using rofi as a picker 2 years ago
listentozen Included using rofi as a picker 2 years ago

README.md

simple_listen_to_di

Allows you to play Digitally Imported (and other streams in that station network) in the console.

Description

Pulls the catalog for Digitally Imported (or the other service) on run, parses it, and presents you with a list of available stations with the description cropped to the size of the terminal. Uses fzf or pick (automatically, in that order) to choose a stream, then calls mplayer or mpv to play the stream.

If you would rather use rofi as a GUI picker, put --gui as the FIRST argument on the commandline.

By default it currently invokes mplayer or, if mplayer is not installed (looking at you, Debian bookworm), mpv in REALLY QUIET mode. If you have cava on your $PATH, it will wait a moment, then display cava. Quitting cava or pressing any key will kill the background instance of mplayer.

If you would rather use MPD, invoke each script with --mpd to have it pipe the results to the end of the current MPD playlist and play it.

If you would rather pass the URL of the stream to something like my stream_to_mpd.sh utility, then invoke the script with --url to get the URL. Example usage:

stream_to_mpd.sh --mpd --host myseekretpassword@mympdhost $(listentodi --url)

NOTE If you have issues with GUI option in an Openbox/etc menu, please try:

/bin/bash -c 'stream_to_mpd.sh --mpd --host myseekretpassword@mympdhost $(listentodi --url)'

as the command to call.

If you were wishing to choose using rofi and use stream_to_mpd.sh, then it would be:

stream_to_mpd.sh --mpd --host myseekretpassword@mympdhost $(listentodi --gui --url)

Edit the script to change it if you like.

Getting Your Subscription/User Key

Requires a paid subscription to Digitally Imported or any of the other services. Create the file $HOME/.config/diuserkey.rc and put your listen key in as the first line.

You can find your listen key on the DI website under Settings -> Player Settings -> Listen Key.

Dependencies