Skip to content

-1 option still re-running command when file not changed #99

@chamber32

Description

@chamber32

I'm using a python script to display an image on an e-ink display when the image changes.
For some reason, it is indicating "==> '/media/share1/cover.png' deleted", then running again, even though image content hasn't changed.
Here is the script I'm running:

#!/usr/bin/env python3

import sys

from PIL import Image

from inky.auto import auto

inky = auto(ask_user=True, verbose=True)
saturation = 1

if len(sys.argv) == 1:
print("""
Usage: {file} image-file
""".format(file=sys.argv[0]))
sys.exit(1)

image = Image.open(sys.argv[1])
resizedimage = image.resize(inky.resolution)

if len(sys.argv) > 2:
saturation = float(sys.argv[2])

inky.set_image(resizedimage, saturation=saturation)
inky.show()

It's album art that I'm displaying, so I know from the song still playing that command shouldn't be running again.

Thanks,

Dave

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