Status of the Wiki

2017-10-04 Thread Daniel Svensson
Hi,
Our extremely well visited, and frequently edited wiki gave up under
the extreme pressure it is under and as a result, a visit to xmms2.org
is now not that informative.

Work is under way to migrate away from hosting our own MediaWiki and
instead dump the whole wiki with its history and content into a git
repository that can be served by for example GitHub.

A lot of progress has been made here by the relentless work of
nesciens and we'll post an update once it's ready to take over as the
authorative source of information.

-- 
Daniel Svensson

--
___
Xmms2-devel mailing list
Xmms2-devel@lists.xmms2.org
https://lists.xmms2.org/cgi-bin/mailman/listinfo/xmms2-devel


Re: Talk to us first before you start reversing our protocol

2017-07-07 Thread Daniel Svensson
On Fri, Jul 7, 2017 at 5:01 PM, niahoo osef <ludo...@laposte.net> wrote:
> Now that I want to test with actual music, I just installed xmms2 on my
> xubuntu laptop (a mere apt install xmms2) but I have the following error :
> Wrong number of arguments to hello.
>
> How could I check the IPC protocol version that is installed on my laptop ?

The number of arguments have been the same since 2010. Your client
passes the IPC protocol version it supports to the server via the
HELLO command. The server may reject it.

This is what the HELLO message is supposed to look like:
https://github.com/xmms2/xmms2-devel/blob/master/src/ipc.xml#L150

If you indeed pass those two arguments, and they're rejected, then you
probably have to dig into the server and see how it's being received.

-- 
Daniel Svensson

--
___
Xmms2-devel mailing list
Xmms2-devel@lists.xmms2.org
https://lists.xmms2.org/cgi-bin/mailman/listinfo/xmms2-devel


Re: Talk to us first before you start reversing our protocol

2017-07-04 Thread Daniel Svensson
On Tue, Jul 4, 2017 at 3:45 AM, niahoo osef <ludo...@laposte.net> wrote:
> Well,
>
> So here I am.
>
> With a friend, we are trying to implement the protocol of sending commands
> to xmms2 via TCP in Elixir (or Erlang). We feel it's hard to find the
> appropriate documentation but I eventually managed to gather some
> information on the wiki, hence the title of this email.

The client can be generated from this specification:
https://github.com/xmms2/xmms2-devel/blob/master/src/ipc.xml

As for the framing, theres unfortunately nothing more than source code:

> At the moment, we are able to send a hello command to the server. We figured
> how to do this by looking at the code of a javascript client.

Here's some WiP-elisp to cheer you up after all of that JS code! :)

http://b07d6c95b4f17404.paste.se/

...this is only the xmmsv_t parsing, not dealing with framing.

> I would like to know where is the more fiable source that says that a
> "hello" command is "32", that an error type is "1", integer is "2" and must
> be 64bits, how to properly encode payload and what to expect in return, …

Abraca actually does this when probing for servers on the local network:

https://github.com/Abraca/Abraca/blob/master/src/abraca-server-prober.vala

There you have a full hello and reply parsing. The reply parsing accepts both
pre and post service clients, pre service clients case can be ignored
if you're targetting xmms2-devel only.

> I don't mind reading any code but I'm far from good at C. I can't find the
> python source code for a module named "xmmsapi" that xmmsclient depends on.

The Python API will not help you as it simply wraps the C API. The
part of the C API you're after can be found here:

This is were all the dirty framing is built up:
https://github.com/xmms2/xmms2-devel/blob/master/src/lib/xmmsipc/msg.c

So message is basically:

32bit object id (see ipc.xml)
32bit command id (see ipc.xml)
32bit cookie for dealing with out-of-order and async results, you will
get this back with each reply
32bit length of payload
 payload, xmmsv_serialize(some_xmmsv_t). It's always a XMMSV_LIST_T

 And a reply is:
32bit object
32bit status
32bit cookie
32bit length

As you see, there's some confusion and legacy. Who needs object id
when you have cookie, and who need status when xmmsv_t can encode
errors. Oh well :)

It might also be helpful to read the testcases for the server, which
are fairly high level:

https://github.com/xmms2/xmms2-devel/tree/master/tests/server

-- 
Daniel Svensson

--
___
Xmms2-devel mailing list
Xmms2-devel@lists.xmms2.org
https://lists.xmms2.org/cgi-bin/mailman/listinfo/xmms2-devel


Re: [PATCH 2/2] utils: tweak 'gen-tarball' to python3

2017-05-26 Thread Daniel Svensson
On Fri, May 26, 2017 at 1:35 PM, Daniel Svensson <dsvens...@gmail.com> wrote:
> Thanks!
>
> On Sat, May 20, 2017 at 6:11 PM,  <sly...@gmail.com> wrote:
>> From: Sergei Trofimovich <sly...@gentoo.org>
>>
>> The changes are mostly:
>> - 'print foo' -> 'print(foo)'
>> - conversion to explicit byte/string API
>>

Pushed.

-- 
Daniel Svensson

--
___
Xmms2-devel mailing list
Xmms2-devel@lists.xmms2.org
https://lists.xmms2.org/cgi-bin/mailman/listinfo/xmms2-devel


Re: [PATCH 2/2] utils: tweak 'gen-tarball' to python3

2017-05-26 Thread Daniel Svensson
Thanks!

On Sat, May 20, 2017 at 6:11 PM,  <sly...@gmail.com> wrote:
> From: Sergei Trofimovich <sly...@gentoo.org>
>
> The changes are mostly:
> - 'print foo' -> 'print(foo)'
> - conversion to explicit byte/string API
>
> Unfortunately this change drops python2 support.

No problem, it's about time projects start dumping Python 2.x support!

>  for a in authors:
> -print " %s:" % a
> +print(" %s:" % a)
>  changes = authorchanges[a]
>  changes.sort()
>  for c in changes:
> -print "  * %s" % c
> +print("  * %s" % c)

Adding .encode("utf-8") fixes the Python 2.x support here this time though.

-- 
Daniel Svensson

--
___
Xmms2-devel mailing list
Xmms2-devel@lists.xmms2.org
https://lists.xmms2.org/cgi-bin/mailman/listinfo/xmms2-devel


Re: Server error: Could not start playback

2016-12-20 Thread Daniel Svensson
On Tue, Dec 20, 2016 at 12:11 AM, Kai Wassermann <kai.wasserm...@gmx.de> wrote:
> On 20.12.2016 00:06, Adam Nielsen wrote:
>>> 23:17:23 DEBUG: ../src/xmms/output.c:817: No plugin to set status on..
>> What output plugin do you have set?
>
> My output looks just like yours:
>
> pi@raudio:$ xmms2 server config | grep output.plugin
> output.plugin = alsa
> pi@raudio:$

And what does this say?
$ xmms2 server plugins | grep alsa

-- 
Daniel Svensson

--
___
Xmms2-devel mailing list
Xmms2-devel@lists.xmms2.org
https://lists.xmms2.org/cgi-bin/mailman/listinfo/xmms2-devel


Re: dynamic collections

2016-11-15 Thread Daniel Svensson
On Mon, Nov 14, 2016 at 8:40 PM, Michele Spelta <aspelt...@gmail.com> wrote:
> in particular I want to build a collection like songs not played in
> the last week and then use this to feed a pshuffle playlist.
> now whenever I try to use laststarted property in a search I am forced
> to use a fixed number as a reference, which means I get all songs
> never played in the last week today but tomorrow this collection will
> not be updated. is there a way of using some relative time reference?
> I am using the client coming with xmms itself (for now this is good
> enough)

Put a client in startup.d that keeps the collection updated. That way
you have the flexibility of taking more characteristics into account
if the need arises. Something that does what you want shouldn't be
more than a handful of lines of Python.

If you're not familiar with Python I can help you out with the script.

-- 
Daniel Svensson

--
___
Xmms2-devel mailing list
Xmms2-devel@lists.xmms2.org
https://lists.xmms2.org/cgi-bin/mailman/listinfo/xmms2-devel


Re: Promoe won't compile any more

2014-01-18 Thread Daniel Svensson
On Sat, Jan 18, 2014 at 8:42 AM, Adam Nielsen a.niel...@shikadi.net wrote:
 Updated to waf 1.7.13. Since Debian installs all the QT4 in /usr/bin I
 have no other way of testing it than to symlink all the utilities
 elsewhere, so I'm hoping you could just clone the following and run
 the build instead. 100 lines of code less at least.

 https://github.com/dsvensson/promoe

 Thanks for this!  I get the below errors when I run it, which looks
 like it's because it can't find rcc?

 $ ./waf configure
 Setting top to   : /home/adam/incoming/promoe
 Setting out to   : /home/adam/incoming/promoe/build
...
 Checking for program rcc : not found
...
 'configure' finished successfully (0.613s)

 $ ./waf build -j1
 Waf: Entering directory `/home/adam/incoming/promoe/build'
 [ 1/55] rcc: data/skins/Almond-blue.qrc - build/data/skins/Almond-blue_rc.cpp
 Waf: Leaving directory `/home/adam/incoming/promoe/build'
 Build failed

 $ locate rcc | grep qt
 /usr/bin/rcc-qt4
 /usr/lib/qt4/bin/rcc

You have the following parameters as seen with ./waf configure --help,
have you tried using them?

  --qtdir=QTDIR
  --qtbin=QTBIN
  --qtlibs=QTLIBS

But it's probably a waf bug that it doesn't discover the
/usr/bin/rcc-qt4 as it does with the other suffixed versions of the
commands.

-- 
Daniel Svensson

--
___
Xmms2-devel mailing list
Xmms2-devel@lists.xmms2.org
http://lists.xmms2.org/cgi-bin/mailman/listinfo/xmms2-devel


Re: Promoe won't compile any more

2013-12-16 Thread Daniel Svensson
Yey for reading things carefully! :)

On Sat, Dec 14, 2013 at 12:12 PM, Adam Nielsen a.niel...@shikadi.net wrote:
 $ python2 waf configure
...
 Check for program rcc: not found
...
 'configure' finished successfully (0.789s)

 $ python2 waf build
...
 Build failed:
  - task failed (err #-1):
 {task: rcc Almond-blue.qrc - Almond-blue_rc.cpp}

So the configure phase doesn't mark rcc as mandatory. rcc is the QT
resource compiler used for embedding the default skin into the binary
I guess.

-- 
Daniel Svensson

--
___
Xmms2-devel mailing list
Xmms2-devel@lists.xmms2.org
http://lists.xmms2.org/cgi-bin/mailman/listinfo/xmms2-devel


Re: What are collections and are playlists collections

2013-05-23 Thread Daniel Svensson
On Thu, May 23, 2013 at 4:47 AM, Francis (Grizzly) Smit
griz...@smit.id.au wrote:
 I'm trying to work out what collections are good for

Collections are a data structure that describes a query of the media
library. This may be a collection that only gives you
Match(artist=Kraftwerk), or it may be an IDList(32,55,66). When the
query is applied you select the media entries that match.

A playlist is just an IDList that refers to the medialib ids you have
decided to have in your playlist.

In the case of Playlist::addCollection you simply apply a collection
to the media library and add the resulting media entries from the
query to the playlist.

Hope this clears it up a bit.

--
Daniel Svensson

--
___
Xmms2-devel mailing list
Xmms2-devel@lists.xmms2.org
http://lists.xmms2.org/cgi-bin/mailman/listinfo/xmms2-devel


Re: [PATCH] src/lib/xmmstypes/xmmsv_dict.c: xmmsv_dict_get() now NULLs 'val' on error

2013-05-20 Thread Daniel Svensson
On Thu, May 2, 2013 at 1:34 PM, Daniel Svensson dsvens...@gmail.com wrote:
 On Thu, May 2, 2013 at 12:22 AM,  sly...@gmail.com wrote:
 From: Sergei Trofimovich sly...@gentoo.org

 Bad use of on-stack garbage was caught by valgrind's 'medialib-runner' unit 
 test

 Nice catch and a good solution.

It actually turned out to be a couple of other problems leading to the
crash you got. The medialib-runner called xmms_medialib_query straight
up, which is bypasses the collection validation applied when using the
xmmsc_coll_query* functions from a client. When fixing this I noticed
that the ORDER type collection validation was a bit sloppy so the case
that caused the crash fell through. And finally when fixing the
validation, the test failed, and that has been fixed now as well.

--
Daniel Svensson

--
___
Xmms2-devel mailing list
Xmms2-devel@lists.xmms2.org
http://lists.xmms2.org/cgi-bin/mailman/listinfo/xmms2-devel


Re: [PATCH] src/lib/xmmstypes/xmmsv_dict.c: xmmsv_dict_get() now NULLs 'val' on error

2013-05-19 Thread Daniel Svensson
On Sun, May 19, 2013 at 8:15 PM, Daniel Svensson dsvens...@gmail.com wrote:
 On Thu, May 2, 2013 at 1:34 PM, Daniel Svensson dsvens...@gmail.com wrote:
 On Thu, May 2, 2013 at 12:22 AM,  sly...@gmail.com wrote:
 From: Sergei Trofimovich sly...@gentoo.org

 Bad use of on-stack garbage was caught by valgrind's 'medialib-runner' unit 
 test

 Nice catch and a good solution. I've just moved to a new apartment so
 I'm heavily interrupted but I'll merge as soon as I get my stuff in
 order. There are probably more of those cases where explicitly setting
 to null should be added.

 Finally time to think a bit more about it and I think it's better to
 leave the value as is if the lookup fails. If anything, perhaps a
 xmmsv_unref should be called if val isn't NULL already. It's better to
 fix the code using xmmsv_dict_get instead. I'll fix it.

Writing before thinking is stoopid, that would obviously require the
ptr to always be initialized, which isn't really needed. Anyways,
fixing the code :)

--
Daniel Svensson

--
___
Xmms2-devel mailing list
Xmms2-devel@lists.xmms2.org
http://lists.xmms2.org/cgi-bin/mailman/listinfo/xmms2-devel