Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
chamber32 opened this issue Oct 22, 2024 · 1 comment
Open

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

chamber32 opened this issue Oct 22, 2024 · 1 comment

Comments

@chamber32
Copy link

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

@chamber32
Copy link
Author

Never mind, it turns out that OBS w/Tuna really does delete the file and re-add it.
I'm now using this instead: https://github.com/Aldaviva/WinampNowPlayingToFile .

Thanks,

Dave

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant