def kodis(): # Pass the template data into the template dashboard.html and return it to the user if not session.get('logged_in'): flash('Need to login') return render_template('login.html') else: updated_nowplaying = kodi.nowplaying(True) templateData = { 'kodi': kodi.list(), 'now_playing': updated_nowplaying['now_playing'], 'now_playing_image': updated_nowplaying['now_playing_image'], } return render_template('kodi.html', **templateData)
def kodis(): # Pass the template data into the template dashboard.html and return it to the user if not session.get('logged_in'): flash('Need to login') return render_template('login.html') else: updated_nowplaying = kodi.nowplaying(True) templateData = { 'kodi' : kodi.list(), 'now_playing' : updated_nowplaying['now_playing'], 'now_playing_image' : updated_nowplaying['now_playing_image'], } return render_template('kodi.html', **templateData)
def settings(): # Pass the template data into the template dashboard.html and return it to the user if not session.get('logged_in'): flash('Need to login') return render_template('login.html') else: templateData = { 'nodes': list_devices(), 'kodi': kodi.list(), 'zoneminder': zoneminder.list(), 'devices': get_devices(), 'schedule': schedule.list(), 'schedules': schedule.lists() } return render_template('settings.html', **templateData)
def settings(): # Pass the template data into the template dashboard.html and return it to the user if not session.get('logged_in'): flash('Need to login') return render_template('login.html') else: templateData = { 'nodes' : list_devices(), 'kodi' : kodi.list(), 'zoneminder' : zoneminder.list(), 'devices' : get_devices(), 'schedule' : schedule.list(), 'schedules' : schedule.lists() } return render_template('settings.html', **templateData)