jbeluch/xbmcswift2 — pull request #88 by dersphere (2013-01-31 14:35:19+00:00)
Title: added method for setting stream infos

On Frodo the infolabel "duration" does not work like on Eden.
On Eden it assumes string of "mm:ss", with Frodo this was changed.

Frodo prints following warning to xbmc.log:
```WARNING: GetDurationFromMinuteString should be in minutes. Interpreting '2:06' as 2 minutes```
While showing only the minute part ("2:00") or even hides the duration if minute is 0 (like with "0:45").

This issue is discussed here: http://forum.xbmc.org/showthread.php?tid=146794 With the suggestion of using:
```python
list_item.addStreamInfo('video', {'duration': 126})
```
to show the duration like "2:06". XBMC method description here: http://mirrors.xbmc.org/docs/python-docs/xbmcgui.html#ListItem-addStreamInfo

This was not possible with xbmcswift2 so I added ```ListItem.add_stream_info(stream_type, stream_values)```and changed ```ListItem.from_dict()``` to accept it via auto creation. I also added the needed test cases.

Example Usage via implicit ListItem.from_dict():
```python
@plugin.route('/')
def show_demo_entry():
item = {
'label': 'Test Video',
'thumbnail': 'foo.png',
'is_playable': True,
'info': {
'plot': 'foo baar',
},
'stream_info': {
'video': {'duration': 185, 'width' : 1280},
'audio': {'language': 'en'},
},
'path': plugin.url_for('play_video')},
}
return plugin.finish([item])
```