From: Eric Wong <e@80x24.org>
To: Rene Maurer <rmnet@mailc.net>
Cc: dtas-all@nongnu.org
Subject: Re: Output the filename of the current playing song
Date: Fri, 27 Nov 2015 11:34:08 +0000 [thread overview]
Message-ID: <20151127113408.GA11770@dcvr.yhbt.net> (raw)
In-Reply-To: <20151127113317.21e820ad@loco5>
Rene Maurer <rmnet@mailc.net> wrote:
> Hello
>
> I am really very happy using dtas. There are some minor things I miss.
> One thing is a shortcut to get the filename of the current playing song.
> For example something like this:
>
> # COMMANDS
>
> * current song [FILENAME] - output the filename of the current playing
> song or the song at the top if the queue in case the player is
> paused. If FILENAME is specified, the output is written to that file.
Great to know you're still using it!
You can use "dtas-ctl current" and parse the YAML output.
Perhaps something along the lines of:
#!/usr/bin/env ruby
require 'yaml'
x = YAML.load `dtas-ctl current`
if cur = x['current']
puts cur['infile']
elsif x['paused']
x = YAML.load `dtas-ctl queue cat`
puts Array(x[0])[0]
end
Fwiw, I never intended the current player protocol to be used
much; but was planning on writing an MPRIS proxy to talk to
dtas-player and encourage users to use existing MPRIS clients
instead...
However, MPRIS seems to be a dead-end for text-only clients;
while mpd has a strong following. So I'll probably start work
on an mpd protocol proxy over holidays, so we'll have a lot more
clients able to use the playback features dtas-player.
Of course, the editing/effects features of dtas will only be
available via the dtas-player protocol, but the MPD-compatible
library will be able to play YAML files intended for
dtas-splitfx (or anything dtas-player understands).
prev parent reply other threads:[~2015-11-27 11:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-27 10:33 Output the filename of the current playing song Rene Maurer
2015-11-27 11:34 ` Eric Wong [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://80x24.org/dtas/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151127113408.GA11770@dcvr.yhbt.net \
--to=e@80x24.org \
--cc=dtas-all@nongnu.org \
--cc=rmnet@mailc.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/dtas.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).