Example #1
0
def main():
    logging.info('################################')
    logging.info('#### PROCEDURE DEMARRAGE #######')
    logging.info('################################')
    playlist = MyPlaylist().playlist
    if env_variables.omx is True:
        if not env_variables.lock.locked():
            omx_thread = BaOmxThread(playlist, timer_in_seconds=env_variables.ba_timer)
            omx_thread.start()
Example #2
0
File: views.py Project: bobun35/ba
def launch_playlist_all_prog(request):
    """
    lancement de la lecture des ba dont la date de programmation n'est pas depassee
    """
    playlist = MyPlaylist().playlist
    logging.info("Rasberry: %s" % str(env_variables.omx))

    if env_variables.omx is True:
        if not env_variables.lock.locked():
            logging.info("Launching from web site, lock is not set")
            omx_thread = BaOmxThread(playlist, timer_in_seconds=env_variables.ba_timer)
            omx_thread.start()

    return render(request, "bande_annonce/main_page.html", {})