3535 'next_page' : 30605 ,
3636 'by_country' : 30606 ,
3737 'error_stream' : 30608 ,
38- 'station_add_success' : 30609
38+ 'station_add_success' : 30609 ,
39+ 'station_rm_success' : 30610
3940}
4041
4142SORT_TYPES = {
@@ -211,6 +212,7 @@ def add_to_my_stations(station_id):
211212 my_stations [station_id ] = station
212213 my_stations .sync ()
213214 plugin .notify ("Radio" , _ ('station_add_success' ), image = plugin .icon )
215+ plugin .refresh_container ()
214216 else :
215217 plugin .notify ("Radio" , _ ('error_stream' ), image = plugin .icon )
216218
@@ -220,6 +222,8 @@ def del_from_my_stations(station_id):
220222 if station_id in my_stations :
221223 del my_stations [station_id ]
222224 my_stations .sync ()
225+ plugin .notify ("Radio" , _ ('station_rm_success' ), image = plugin .icon )
226+ plugin .refresh_container ()
223227
224228
225229@plugin .route ('/stations/genres' )
@@ -543,7 +547,7 @@ def get_stream_url(station_id):
543547
544548def __add_stations (stations , add_custom = False , browse_more = None ):
545549 items = []
546- my_station_ids = my_stations . keys ()
550+ my_station_ids = [ int ( item ) for item in my_stations if item . isdigit ()]
547551 for i , station in enumerate (stations ):
548552 if station :
549553 station_id = station .get ('id' )
@@ -589,20 +593,20 @@ def __add_stations(stations, add_custom=False, browse_more=None):
589593 },
590594 'offscreen' : True
591595 })
592- if add_custom :
593- items .append ({
594- 'label' : _ ('add_custom' ),
595- 'path' : plugin .url_for ('custom_my_station' , station_id = 'new' ),
596- })
596+ if add_custom :
597+ items .append ({
598+ 'label' : _ ('add_custom' ),
599+ 'path' : plugin .url_for ('custom_my_station' , station_id = 'new' ),
600+ })
597601
598- if browse_more :
599- items .append ({
600- 'label' : '[B]%s[/B]' % _ ('next_page' ) % (browse_more ['page' ], browse_more ['total_pages' ]),
601- 'path' : browse_more ['url' ],
602- 'icon' : browse_more ['icon' ],
603- 'fanart' : browse_more ['fanart' ],
604- 'offscreen' : True
605- })
602+ if browse_more :
603+ items .append ({
604+ 'label' : '[B]%s[/B]' % _ ('next_page' ) % (browse_more ['page' ], browse_more ['total_pages' ]),
605+ 'path' : browse_more ['url' ],
606+ 'icon' : browse_more ['icon' ],
607+ 'fanart' : browse_more ['fanart' ],
608+ 'offscreen' : True
609+ })
606610
607611
608612 finish_kwargs = {
0 commit comments