https://github.com/uriel1998/simple_listen_to_di
Allows you to listen to Digitally Imported (legally, with paid subscription) in the console.
https://github.com/uriel1998/simple_listen_to_di
bash cli mplayer streaming
Last synced: 2 months ago
JSON representation
Allows you to listen to Digitally Imported (legally, with paid subscription) in the console.
- Host: GitHub
- URL: https://github.com/uriel1998/simple_listen_to_di
- Owner: uriel1998
- License: mit
- Created: 2016-09-05T19:20:35.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2024-10-24T08:04:44.000Z (over 1 year ago)
- Last Synced: 2024-10-25T01:04:38.334Z (over 1 year ago)
- Topics: bash, cli, mplayer, streaming
- Language: Shell
- Homepage:
- Size: 34.2 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://git.faithcollapsing.com/yolo-mpd/tree/master/)
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
* [fzf](https://github.com/junegunn/fzf) OR
* [pick](https://github.com/thoughtbot/pick) OR
* [rofi](https://github.com/davatorium/rofi) (with the --gui switch as the *first* argument)
* [mplayer](https://www.mplayerhq.hu/design7/news.html) OR
* [mpv](https://mpv.io/)