SoCo/SoCo — pull request #203 by KennethNielsen (2014-08-24 18:09:34+00:00)
Title: Added container data type for search and browse

This PR implements a data type (soco.data_strctures.SearchResult) for search and browse results. It subclasses a tuple, so you can now do all the cool things with these search results as you can do with a tuple like iterating over them, indexing and slicing etc.

The metadata that follows a search or a browse is available as names attributes.

I have "super charged" the __getitem__ method, to allow getting the metadata (or the list of items) in the old way i.e. by indexing the object with strings like a dictionary and prints out a deprecation warning when that happens. It is ugly (being able index an object both by strings and numbers), but it means that we can keep backwards compatibility untill user have time to fix their code up.

Exampels of use:
```python
>>> s = SoCo(ip_address)
>>> artists = s.get_music_library_information('artists')
>>> type(artists)

>>> artists.search_type
'artists'
>>> artists.number_returned
100
>>> artists.total_matches
151
>>> for artist in artists:
... if artist.title.lower() == 'metallica':
... metallica = artist
... break
...
>>> metallica

>>> s.browse(metallica)
SearchResult(items=(, , , , , , , , , , , , , , , , , , , , , , , ), search_type=browse)
```

What do you guys think?

I'll update the get_queue and music plugin code after we have done the review of this first part.