Pianobar

出自 ArchWiki

Pianobar 是一个自由/开源的,基于控制台的在线个性化电台 Pandora 客户端 (仅在美国可用)。

特性

  • 播放和管理电台(创建、添加更多音乐、删除、重命名...)
  • 评价歌曲并解释选择原因
  • 即将播放的歌曲/歌曲历史
  • 自定义快捷键和文本输出
  • 远程控制和 eventcmd 接口(例如,将曲目发送到 last.fm)
  • 为美国境外的听众提供代理支持
提示: 由于 Pianobar 是一个基于命令行界面的程序,它可以放置在与桌面不同的虚拟终端中并保持运行。

安装

安装 pianobar 软件包。

配置

首先,您需要为 Pianobar 创建一个配置文件。该文件应位于 $XDG_CONFIG_HOME/pianobar/config~/.config/pianobar/config

$ man pianobar
CONFIGURATION
       The  configuration file consists of simple key = value lines, each ter‐
       minated with a newline (\n) character. Note that keys  and  values  are
       both  case  sensitive, and there must be exactly one space on each side
       of the equals sign.

       act_* keys control pianobar's key-bindings.  Every  one-byte  character
       except for \x00 and the special value disabled are allowed here.

这是一个配置文件示例。有关更多配置选项,请参阅 pianobar(1)

~/.config/pianobar/config
audio_quality = {high, medium, low}
autostart_station = stationid

password = plaintext_password
user = your@user.name

故障排除

声音质量问题

如果您在运行 pianobar 时遇到声音/质量问题,并且您当前正在使用 ALSA 作为您的声音驱动程序,则以下修复方法可能有用。

警告: 提供的修复方法可能会影响其他使用音频的应用程序,因为默认驱动程序正在被更改。

安装 alsa-oss。有关更多信息,请参阅 ALSA 页面。

将默认的 libao 驱动程序从 alsa 更改为 oss

/etc/libao.conf
default_driver=oss

现在运行 pianobar

$ aoss pianobar

或者,您可以使用 PulseAudio

/etc/libao.conf
default_driver=pulse
注意: 请务必删除 ALSA 驱动程序的 dev=default 选项,或对其进行调整以指定特定的 Pulse sink 名称或编号。

网络错误

如果您收到 Network error: Peer certificate cannot be authenticated with given CA certificates 错误,请尝试添加以下行

~/.config/pianobar/config
ca_bundle = /etc/ca-certificates/extracted/tls-ca-bundle.pem

参见