Page 1 of 1

rc interface special functionality

Posted: 01 Jan 2009 23:24
by olegkirillov
Hi!
I'm rewriting the rc console interface to implement special functionality for my Internet-TV channel.
Now I need one function, that is not straightforward. I need a special command (I call it "sweep") to delete all playlist contents except the currently playing file. There are two hurdles - to determine the file being played (I suppose I'll be able to find sometning like this in http interface) and to delete the all other playlist items (I don't know yet how to do this).

Could anyone give me a hint or code snippet?

TIA

Re: rc interface special functionality

Posted: 02 Jan 2009 12:29
by Jean-Baptiste Kempf
Modify the file in modules/controls/rc.c

Re: rc interface special functionality

Posted: 02 Jan 2009 22:28
by olegkirillov
Heh... I know what to change but I don't know how. :)
What I do really need is the way to find the current input's position in playlist to try deletion loops on items before and after the currently playing one.

I was surprised when I discovered that current version of rc.c does not have the "remove" command. Now mine has one. :)

Re: rc interface special functionality

Posted: 09 Jan 2009 00:13
by olegkirillov
Solved. :)
Added "clear" command (it was missing in rc interface).
Added "i_id" field in "playlist" command output.
Added "goto <i_id>" command.
Added "remove <i_id>" command.
Added "sweep" command (removes all playlist items except currently playing one).

if someone is interested in these functions I can build a diff.

Re: rc interface special functionality

Posted: 09 Jan 2009 01:54
by Jean-Baptiste Kempf
Yes, diff would be great!