-
Notifications
You must be signed in to change notification settings - Fork 54
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
Enhancement Request: Channel Change Button? #4
Comments
I have this implemented on my build via the use of SSH command from my phone. Basically i just trigger a process kill command that looks for a specific omxplayer running process (in my case there are always 2 running and the one that is playing the episodes uses additional command line --layer 10). Since there is a service running once the current process is killed it immediately starts up the process again but obviously due to the randomized nature of episodes a different episode is then played. This is basically my skip episode button. I send command If you only have one instance of omxplayer running then this should probably be enough If you would want to do this via an actual physical button i guess you could relatively easily pick out one of the unused GPIO pins and configure it in the RPI to run this exact command depending on its state (either low or high). |
Incidentally since in the topic subject you also mentioned Channel change button i have a solution for that as well. Since i had enough space on my SD card i placed all Futurama episodes in a seperate folder and wrote a very simple bash script that that renames the main python file that is responsible for running the episodes for a different one which is configured to run episodes from the Futurama folder. This again like the skip episode function i described above is triggered by an SSH command from my phone but again could probably easily be hooked up to a physical switch via one of the GPIO pins. ============================================================================ #!/bin/bash #Check the original files exists or not if [ -f /home/sysop/simpsonstv/playertmp.py ]; then if [ -f /home/sysop/simpsonstv/player.py ]; then sudo systemctl restart tvplayer.service ============================================================================ For this script to work you only need to create a second player.py file which has the folder configured where you store your other files that would be your second channel. In my above example player.py is the original file from buba which points to the folder where the simpsons episodes are located at and player1.py is configured for my Futurama folder. After the script switches the order of the player.py files the player service is restarted and voila you "switched the channel" ;) |
Any chance we can add in the ability to put a button which will skip the episode (channel change)?
The text was updated successfully, but these errors were encountered: