Permalink
Browse files

added demo for possible m3u bug

  • Loading branch information...
1 parent 494a3a6 commit 9e715215d3a567916b8b16fb67db177847d84345 @dersphere committed Jan 31, 2012
Showing with 29 additions and 0 deletions.
  1. +29 −0 addon.py
View
@@ -45,6 +45,9 @@ def _make_listitem(self, label, label2='', iconImage='', thumbnail='',
def show_root_menu():
__log('show_root_menu start')
items = []
+ items.append({'label': 'M3U DEMO',
+ 'url': plugin.url_for('m3u_demo')})
+
items.append({'label': plugin.get_string(30107),
'url': plugin.url_for('show_local_stations')})
@@ -84,6 +87,32 @@ def show_root_menu():
return plugin.add_items(items)
+@plugin.route('/m3u_demo/')
+def m3u_demo():
+ __log('m3u_demo start')
+ items = [{'info': {'comment': u'', 'rating': '0', 'Title': u'',
+ 'genre': u'', 'tracknumber': 0, 'Size': 128},
+ 'url': 'plugin://plugin.audio.radio_de/m3u_demo_2/',
+ 'is_playable': True,
+ 'label': u'Bayern 3 WORKS NOT',
+ 'is_folder': False,
+ 'thumbnail': u'http://static.radio.de/images/broadcasts/2247_io_1.jpeg'},
+ {'info': {'comment': u'', 'rating': '0', 'Title': u'',
+ 'genre': u'', 'tracknumber': 0, 'Size': 128},
+ 'url': 'http://streams.br-online.de/bayern3_2.m3u',
+ 'is_playable': True,
+ 'label': u'Bayern 3 WORKS',
+ 'is_folder': False,
+ 'thumbnail': u'http://static.radio.de/images/broadcasts/2247_io_1.jpeg'}]
+ __log('m3u_demo end')
+ return plugin.add_items(items)
+
+
+@plugin.route('/m3u_demo_2/')
+def m3u_demo_2():
+ return plugin.set_resolved_url('http://streams.br-online.de/bayern3_2.m3u')
+
+
@plugin.route('/local_stations/')
def show_local_stations():
__log('show_local_stations start')

0 comments on commit 9e71521

Please sign in to comment.