RhythmBox是否有任何命令行界面或进程间通信方法?

Modified on: Thu, 14 Jun 2018 12:11:23 +0800

我真的很想通过网络服务器与rhythmbox通信,这样我就可以远程更改智能手机播放的音乐。使用rhythmbox的命令行界面可以执行以下(虚构)命令吗?

接下来

rhythmbox next
rhythmbox shuffle=false
rhythmbox change album='Dark Side of the Moon' artist='Pink Floyd' song='Time' 

是否有套接字或消息传递接口?是否有任何可以完成工作的替代程序,如Banshee或其他类型的服务器?

最佳答案

基本上,简短的答案是“是”,这样的答案的补充将是“使用终端的rhythmbox-client命令来控制当前运行的Rhythmbox,如果不是已加载命令的第一个实例将调用它。“

例如:rhythmbox-client --play将使当前的Rhythmbox会话开始播放当前歌曲(或列表中的第一首歌曲)。如果Rhythmbox关闭,它将首先打开它以开始播放。

有关rhythmbox-client及其用法的更多信息,请访问rhythmbox-client手册页。我在这里放置了一部分手册页仅供参考。

NAME rhythmbox-client - controls a running instance of rhythmbox SYNOPSIS rhythmbox-client [option...][file...] DESCRIPTION rhythmbox-client is a tool for controlling an already running instance of rhythmbox. It's useful for remote control scripting, adding specific files to the library from the shell, or printing details of what's playing. It also has an interactive mode, useful for controlling playback remotely via ssh. Any files specified after the option arguments will be added to the library. If the --enqueue option is given, the files will also be added to the play queue. OPTIONS -?,--help Show help options --debug Enable debug output --no-start Do not start a new instance of rhythmbox --quit Quit rhythmbox -i,--interactive Start interactive mode --no-present Don't present an existing rhythmbox window --next Jump to next song --previous Jump to previous song --play Resume playback if currently paused --pause Pause playback if currently playing --play-pause Toggle play/pause mode --stop Stop playback if currently playing --play-uri=URI Play a specified URI, importing it if necessary --enqueue Add specified tracks already in the library to the play queue --clear-queue Empty the play queue before adding new tracks --print-playing Print the title and artist of the playing song --print-playing-format=format Print formatted details of the song (see FORMAT OPTIONS below). --set-volume Set the playback volume --volume-up Increase the playback volume --volume-down Decrease the playback volume --print-volume Print the current playback volume --select-source=URI Select the source corresponding to a URI (device or mount point) --activate-source=URI Select the source corresponding to a URI (device or mount point) and start playing from it if not already playing. --play-source=URI Select the source corresponding to a URI (device or mount point) and start playing from it. FORMAT OPTIONS %at album title %aa album artist %aA album artist (lowercase) %as album artist sortname %aS album artist sortname (lowercase) %ay album year %ag album genre %aG album genre (lowercase) %an album disc number %aN album disc number, zero padded %st stream title %tn track number (i.e 8) %tN track number, zero padded (i.e 08) %tt track title %ta track artist %tA track artist (lowercase) %ts track artist sortname %tS track artist sortname (lowercase) %td track duration %te track elapsed time Variables can be combined using quotes. For example "%tn %aa %tt", will print the track number followed by the artist and the title of the track. AUTHOR This manual page was written by Sven Arvidsson <sa@whiz.se>, for the Debian system (but may be used by others).

修改

我对这个主题感兴趣,所以我用下一个命令运行测试:

NAME
       rhythmbox-client - controls a running instance of rhythmbox

SYNOPSIS
       rhythmbox-client [option...][file...]

DESCRIPTION
       rhythmbox-client  is a tool for controlling an already running instance
       of  rhythmbox.   It's  useful  for  remote  control  scripting,  adding
       specific  files  to  the library from the shell, or printing details of
       what's playing. It also has an interactive mode, useful for controlling
       playback  remotely  via  ssh.  Any  files  specified  after  the option
       arguments will be added to the library.  If  the  --enqueue  option  is
       given, the files will also be added to the play queue.

OPTIONS
       -?,--help
              Show help options

       --debug
              Enable debug output

       --no-start
              Do not start a new instance of rhythmbox

       --quit Quit rhythmbox

       -i,--interactive
              Start  interactive  mode  --no-present Don't present an existing
              rhythmbox window

       --next Jump to next song

       --previous
              Jump to previous song

       --play Resume playback if currently paused

       --pause
              Pause playback if currently playing

       --play-pause
              Toggle play/pause mode

       --stop Stop playback if currently playing

       --play-uri=URI
              Play a specified URI, importing it if necessary

       --enqueue
              Add specified tracks already in the library to the play queue

       --clear-queue
              Empty the play queue before adding new tracks

       --print-playing
              Print the title and artist of the playing song

       --print-playing-format=format
              Print formatted details of the song (see FORMAT OPTIONS below).

       --set-volume
              Set the playback volume

       --volume-up
              Increase the playback volume

       --volume-down
              Decrease the playback volume

       --print-volume
              Print the current playback volume

       --select-source=URI
              Select the source corresponding to a URI (device or mount point)

       --activate-source=URI
              Select the source corresponding to a URI (device or mount point)
              and start playing from it if not already playing.

       --play-source=URI
              Select the source corresponding to a URI (device or mount point)
              and start playing from it.

FORMAT OPTIONS
       %at    album title

       %aa    album artist

       %aA    album artist (lowercase)

       %as    album artist sortname

       %aS    album artist sortname (lowercase)

       %ay    album year

       %ag    album genre

       %aG    album genre (lowercase)

       %an    album disc number

       %aN    album disc number, zero padded

       %st    stream title

       %tn    track number (i.e 8)

       %tN    track number, zero padded (i.e 08)

       %tt    track title

       %ta    track artist

       %tA    track artist (lowercase)

       %ts    track artist sortname

       %tS    track artist sortname (lowercase)

       %td    track duration

       %te    track elapsed time

       Variables can be combined using quotes. For example "%tn %aa %tt", will
       print  the  track  number  followed  by the artist and the title of the
       track.

AUTHOR
       This manual page was written by Sven Arvidsson  <sa@whiz.se>,  for  the
       Debian system (but may be used by others).

从原来的答案发布在这里。这确实适用于寻找当前播放歌曲的任务(基于提问者的评论)。

祝你好运!


相关问答

添加新评论