- Have a https://di.fm Premium Account
- Install mpv - The command line media player
- Pull or copy the .sh files to a project folder from the repo
- If you want to change the stations, to know what data to add accuerately, see the "Adding Stations:" below
- Run
chmod +x *.sh
- Browse to https://www.di.fm/settings: Player Settings: Listen Key
- Copy the key
- Run
./build_pls_di.sh
- Paste in the Listen Key when prompted
- Run
./di.sh
- Choose the number you want to listen to
- Use the standard controls that are a part of mpv (q = QUIT)
- Choose another channel or
^C
to exit the menu
To add a station you need to download the defaul playlist from di.fm. This will work in your menu, however to automate the "rebuilding" of the playlists, you will want to extract the appropriate data.
- Browse to di.fm settings: External Player Settings
- Select "Single Channel" radio button
- Choose a channel
- Choose the stream quality (NOTE: If you listen at coffee shops, you may have hiccups in the caching 320k stream)
- Click "Download .pls file" and save it into the approriate folder
- Extract the fields to match the arrays in build_pls_di.sh: station, stations_title, stations_file_name
- Make sure you add them in the right order or your playlists will build with the wrong names and links
- If you don't like a station, you can delete that individual playlist file.
- If you want to edit the stations or if your API KEY changes, delete all .pls files, modify the arrays (all 3) in build_pls_di.sh, Run the Setup again.
- add more (all) channels
- put separate arrays into a matrix
# Init a 4x5 matrix
a=("0 0 0 0 0" "0 0 0 0 0" "0 0 0 0 0" "0 0 0 0 0")
- echo an alias to the ~/.bashrc file so
$ di
is executable (versus adding to $PATH)
[EDIT]