SoCo/SoCo — pull request #92 by KennethNielsen (2014-03-02 16:08:29+00:00)
Title: Wimp plugin part 1

Hallo everyone

Here's part 1 of the first music service plugin for SoCo, for the Wimp music service. The PR also contains the first version of the music service data structures, which can be used by other music services as well.

Since I have written the data structures using just a single service, there will probably be things that needs to be made more general, but that will be discovered when the second music service shows up.

The plugin implements get_x (x being tracks, albums etc) methods comparable to these found in core for the music library. The search results can be added to the queue by the core add_to_queue method, just like music library items.

So to use it you can do something like:
``` python
from soco.plugins.wimp import Wimp
import soco
soc = soco.SoCo(ip)
wimp = Wimp(soc, your_user_id)
tracks = wimp.get_tracks('Minerva')
soc.add_to_queue(tracks[0])
```

NOTE: The music service artist items cannot be played. It seems to also be the case with my other music service. Therefore, they cannot at present be added to the queue. They can however (probably) be browsed, to ultimately yield playable items, but that is for part 2. Point is, that this is the reason for the changes in inheritance in the data_stuctures at the top level.

If you happen to look the code over, but are not able to test, because you do not have access to this service, please write so in a comment, because I would rather not be waiting for testing that might not show up.