Example #1
0
def view_image(image, asset_id, duration):
    logging.debug('Displaying image %s for %s seconds.' % (image, duration))
    url = html_templates.image_page(image, asset_id)
    browser_url(url)

    sleep(int(duration))

    browser_url(black_page)
Example #2
0
def view_image(image, name, duration):
    logging.debug('Displaying image %s for %s seconds.' % (image, duration))
    url = html_templates.image_page(image, name)
    f = open(fifo, 'a')
    f.write('set uri = %s\n' % url)
    f.close()
    
    sleep(int(duration))
Example #3
0
def view_image(image, name, duration):
    logging.debug('Displaying image %s for %s seconds.' % (image, duration))
    url = html_templates.image_page(image, name)
    f = open(fifo, 'a')
    f.write('set uri = %s\n' % url)
    f.close()

    sleep(int(duration))

    f = open(fifo, 'a')
    f.write('set uri = %s\n' % black_page)
    f.close()
Example #4
0
def view_image(uri, asset_id, duration):
    logging.debug('Displaying image %s for %s seconds.' % (uri, duration))

    if asset_is_accessible(uri):
        logging.debug('Image appears to be available. Proceeding.')
        logging.debug('Displaying uri %s for %s seconds.' % (uri, duration))

        image_tmp_page = html_templates.image_page(uri, asset_id)

        browser_url(image_tmp_page)

        sleep(int(duration))
    else:
        logging.debug('Received non-200 status (or file not found if local) from %s. Skipping.' % (uri))