Skip to content

Commit

Permalink
extras: Add extras/mpvc-somafm
Browse files Browse the repository at this point in the history
  • Loading branch information
gmt4 committed Sep 5, 2024
1 parent 41a92ad commit 2b7e19d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions extras/mpvc-somafm
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env sh
#
# @file mpvc-somafm
# @description mpvc-somafm, mpvc script for playing SomaFM channels
# @author gmt4 <gmt4 at github.com> (c) Copyright 2024 GPLv2+
# @url github.com/gmt4/mpvc
# SPDX-License-Identifier: GPL-2.0-or-later
#

file=${XDG_CONFIG_HOME:-$HOME/.config}/mpvc/somafm-channels.json
[ ! -s "$file" ] && curl -fsSL -o "https://somafm.com/channels.json"
jq -r '.channels | sort_by(.listeners | tonumber) | reverse | .[] | (.playlists[3]|.url) + ";" + .listeners + " ls "+.genre+";"+ .title' "$file" | column -s ';' -t | mpvc-fzf -F

0 comments on commit 2b7e19d

Please sign in to comment.