everything related to duct tape audio suite (dtas)
 help / color / Atom feed
* Output the filename of the current playing song
@ 2015-11-27 10:33 Rene Maurer
  2015-11-27 11:34 ` Eric Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Rene Maurer @ 2015-11-27 10:33 UTC (permalink / raw)
  To: dtas-all

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.

Best
René


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Output the filename of the current playing song
  2015-11-27 10:33 Output the filename of the current playing song Rene Maurer
@ 2015-11-27 11:34 ` Eric Wong
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Wong @ 2015-11-27 11:34 UTC (permalink / raw)
  To: Rene Maurer; +Cc: dtas-all

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).


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-27 10:33 Output the filename of the current playing song Rene Maurer
2015-11-27 11:34 ` Eric Wong

everything related to duct tape audio suite (dtas)

Archives are clonable:
	git clone --mirror https://80x24.org/dtas-all
	git clone --mirror http://ou63pmih66umazou.onion/dtas-all

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.audio.dtas
	nntp://ou63pmih66umazou.onion/inbox.comp.audio.dtas

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git