def mode_stations():
    for (pid, station) in stations_ordered.items():
        url = build_url({'mode': 'station', 'pid': pid})
        li = xbmcgui.ListItem(station['name'])
        li.setThumbnailImage(xbmc.translatePath(os.path.join(__addon__.getAddonInfo('path'), 'resources', (station['image'] + '.png'))))
        xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li, isFolder=True)
    xbmcplugin.endOfDirectory(addon_handle)
def mode_stations():
    for (pid, station) in stations_ordered.items():
        url = build_url({'mode': 'station', 'pid': pid})
        li = xbmcgui.ListItem(station['name'])
        li.setThumbnailImage(xbmc.translatePath(os.path.join(__addon__.getAddonInfo('path'), 'resources', (station['image'] + '.png'))))
        xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li, isFolder=True)
    xbmcplugin.endOfDirectory(addon_handle)