예제 #1
0
def web_device(device):
    devices = sorted([x for x in Device.get_devices() if x['model'] in Rom.get_devices()], key=lambda device: device['model'])
    oems = sorted(list(set([x['oem'] for x in devices])))

    roms = Rom.get_roms(device=device, before=app.config['BUILD_SYNC_TIME'])

    active_oem = [x['oem'] for x in devices if x['model'] == device]
    active_oem = active_oem[0] if active_oem else None

    return render_template("device.html", active_oem=active_oem, active_device=device, oems=oems, devices=devices, roms=roms)
예제 #2
0
def web_extras():
    devices = sorted(
        [x for x in Device.get_devices() if x['model'] in Rom.get_devices()],
        key=lambda device: device['name'])
    oems = sorted(list(set([x['oem'] for x in devices])))

    return render_template("extras.html",
                           oems=oems,
                           devices=devices,
                           extras=True)
예제 #3
0
def show_changelog(device='all', before=-1):
    devices = sorted(
        [x for x in Device.get_devices() if x['model'] in Rom.get_devices()],
        key=lambda device: device['name'])
    oems = sorted(list(set([x['oem'] for x in devices])))
    return render_template('changes.html',
                           oems=oems,
                           devices=devices,
                           device=device,
                           before=before,
                           changelog=True)
예제 #4
0
def web_main():
    devices = sorted([x for x in Device.get_devices() if x['model'] in Rom.get_devices()], key=lambda device: device['model'])
    oems = sorted(list(set([x['oem'] for x in devices])))
    return render_template("main.html", oems=oems, devices=devices)