Application to turn your Raspberry Pi into a dedicated looping video playback device, good for art installations, information displays, or just playing cat videos all day.
GNU General Public License v2.0
452
stars
239
forks
source link
Safely Power down the PI from the looper application #120
I'm not a Python expert but write apps professionally for Linux using C/C++.
Would it be possible to power down the PI from the looper application by adding something like this to _handle_keyboard_shortcuts():
if event.key == pygame.K_p:
self._print("p was pressed, shutting down...")
self._player.stop(3)
subprocess.run(['sudo', 'shutdown', 'now'])
I'm not a Python expert but write apps professionally for Linux using C/C++. Would it be possible to power down the PI from the looper application by adding something like this to _handle_keyboard_shortcuts():