Skip to content

Album rotation - multiple images #6

@NullVsNone

Description

@NullVsNone

Could this be enhanced to support uploading multiple images, with a set timer to rotate between the "album" of images?

Not very experienced in python (nor Pi(s)), but something along the lines of:

  • No longer calling delete image

deleteImage()

  • [Optional] Use a UUID for filename for multiple uploads

filename = secure_filename(file.filename)

  • Introducing an updater
import sched, time, random

def cycle_album(scheduler): 
    scheduler.enter(3600, 1, cycle_album, (scheduler,))
    updateEink(random.choice(UPLOAD_FOLDER, ORIENTATION,ADJUST_AR)

album_schedule = sched.scheduler(time.time, time.sleep)
album_schedule.enter(3600, 1, cycle_album, (album_schedule,))
album_schedule.run()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions