VLC: shutdown PC after playlist or playback ends

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
tgbv
New Cone
New Cone
Posts: 1
Joined: 14 Oct 2020 11:13

VLC: shutdown PC after playlist or playback ends

Postby tgbv » 14 Oct 2020 11:26

Hello! I hope it's the right forum section for this post.

Every once in a while at around 10PM I may decide to play a movie on my computer and fall asleep at it. I normally sleep ~8 hours/night but the film I watch is <= 2hours. That means my PC gets to stay awake 6 more hours and wait for my ass to wake up and shut it down. Why should my computer stay awake that long for no reason?? A checkbox in settings would do it: "Shutdown computer after playlist ends". Yet such option doesn't exist.

There are workarounds on internet for this issue but all I could see are tedious methods using VBS/Batch/Bash scripts + drag&drops (eg: https://wiki.videolan.org/VLC_HowTo/Shu ... _playlist/) which I believe is terrible

So I came up with something slightly better: a trigger which runs independently from vlc thread and checks when movie is over/playlist is empty. The script is written and compiled for Windows OS using Autoit3: https://www.autoitscript.com;
Haven't tested it on linux but I think you can run it via Wine emulator.
I don't know of MacOS.

Project git is hosted publicly: https://github.com/tgbv/vlc-shutdown-after-playback
Direct exe download: https://github.com/tgbv/vlc-shutdown-af ... rapper.exe

Hope it'll help somebody; contributions are more than welcomed!

Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 10 guests