In case it helps someone, I found out here that Player.GetActivePlayers and Player.GetItem can be used by a script to make sure the previous message is no longer playing before before playing another with Player.Open.
Posts by yoyoma2
-
-
You could try rpi-clone Here. It uses rsync which I believe is installed already on LE. It can be run standalone in the home folder as ./rpi-clone. (No need to copy to /usr/local/sbin as in the install instructions)
I haven't tested it on LE yet but it works on Raspbian and has the added bonus that the system doesn't have to be shutdown.I just used this script to clone my LibreELEC 9.2.8 micro SD card on rpi2. This project forked from the one mentioned by Iridium and was tweaked specifically for LibreELEC. I had to install Network Tools (Addons->Install from repository->LibreELEC Addons->Program add-ons->Network Tools) to get the required rsync tool.
I put the command in a backup.sh script so I don't need to remember the arguments next time I use rpi-clone. I only had one destination micro SD card in a USB adapter so destination "sda" might be different for you if you have multiple destinations (sda, sdb, sdc...). It's fast (partitioning can be skipped if destination partitions are identical) and only content is copied not empty sectors. Also the system doesn't have to be shutdown as mentioned by Iridium.
-
From xxx.xxx.138.49 on LibreELEC release: RPi2.arm-9.2.8 I can't install the network tools addon:
Code
Display More2023-02-20 09:35:07.912 T:1936929856 DEBUG: CAddonInstaller: installing 'virtual.network-tools' version '9.2.0.104' from repository 'repository.libreelec.tv' 2023-02-20 09:35:08.038 T:1807721344 ERROR: CCurlFile::Stat - Failed: Couldn't connect to server(7) for https://addons.libreelec.tv/9.2.0/RPi2/arm/virtual.network-tools/virtual.network-tools-9.2.0.104.zip 2023-02-20 09:35:08.039 T:1807721344 DEBUG: CurlFile::Open(0x70e10f80) https://addons.libreelec.tv/9.2.0/RPi2/arm/virtual.network-tools/virtual.network-tools-9.2.0.104.zip 2023-02-20 09:35:08.155 T:1807721344 ERROR: CCurlFile::FillBuffer - Failed: Couldn't connect to server(7) 2023-02-20 09:35:08.155 T:1807721344 ERROR: CCurlFile::Open failed with code 0 for https://addons.libreelec.tv/9.2.0/RPi2/arm/virtual.network-tools/virtual.network-tools-9.2.0.104.zip: 2023-02-20 09:35:08.156 T:1807721344 ERROR: CAddonInstallJob[virtual.network-tools]: failed to download special://home/addons/packages/virtual.network-tools-9.2.0.104.zip 2023-02-20 09:35:08.179 T:1936929856 DEBUG: ------ Window Init (DialogNotification.xml) ------ 2023-02-20 09:35:08.293 T:1512956800 ERROR: CCurlFile::Stat - Failed: Couldn't connect to server(7) for https://addons.libreelec.tv/9.2.0/RPi2/arm/virtual.network-tools/resources/icon.png 2023-02-20 09:35:08.293 T:1512956800 DEBUG: GetImageHash - unable to stat url https://addons.libreelec.tv/9.2.0/RPi2/arm/virtual.network-tools/resources/icon.png 2023-02-20 09:35:08.344 T:1936929856 DEBUG: CGUIMediaWindow::GetDirectory (addons://repository.libreelec.tv/xbmc.addon.executable) 2023-02-20 09:35:08.345 T:1936929856 DEBUG: ParentPath = [addons://repository.libreelec.tv/xbmc.addon.executable]
Networking is working fine otherwise on the rpi2.
-
Recently upgraded from libreelec 8.2.x to 9.2.0. To my surprise, the up or down arrow now shows the current channel info for a few seconds as openelec used to. Nice!
-
That setting only shows the channel information of the new channel after changing. What openelec did was show the channel information of the current channel on the first up/down button press.
-
While watching live TV in openelec, hitting up or down arrow would show, for a few seconds, the channel number, channel logo, program title, program description etc... Hitting up or down arrow again while this information was up, would perform channel up/down.
In libreelec, hitting up or down arrow immediately performs channel up/down. How can the openelec channel info behavior be recreated? The keymap editor? Note that with very limited buttons on my remote that work with the rpi2's CEC functionality, the dual use of the arrow buttons was very convenient.
-
I'm new to libreelec but have years of openelec use. Which statement was unclear? It's not possible for a script to make a playlist now to announce all messages for future unknown events. The script could only create a playlist of the single file of the message it is trying to announce now. Would this playlist call be synchronous/blocking as opposed to the single file asynchronous/nonblocking method you gave in post #4? Do playlists always play to completion even if another playlist call is made. The single file play call you gave in post #4 does not block and if a second call is made too soon, the currently playing message aborts and the second one begins. Unless the single file playlist behavior is different than the single file behavior, we have the same problem.
Since libreelec includes command line tools for playing audio files mentioned in post #1, there must be a way to use them right?
Sorry if I came across as a spammer. I am genuinely trying to use "paplay" or "aplay" which are part of libreelec.
-
Make a playlist and play that. You need to decide based on your requirements.
These are continuously running scripts monitoring/reporting real-time events. Unless a single file playlist will be synchronous/blocking or would play to completion should a subsequent single file playlist be sent, it's the same problem.
Surely the included tools mentioned in post #1 can work with the proper arguments?
-
What sort of file format are you trying to play?
See post #3
-
That sort of works but can it be synchronous? The script's messages begin playing one after the other with only the final message playing to completion.
-
I've tried both wav and mp3 but can't get anything to play from the command line/script. If a certain format works, I can convert the audio files to that. Note that libreelec (kodi) on rpi2 plays audio just fine on the hdmi tv.
-
Marking thread as resolved.
-
Both /usr/bin/paplay and /usr/bin/aplay are included in libreelec so how would I play an audio file on a vanilla rpi2 on an hdmi TV? Tried a bunch of command line arguments and could not play an audio file from the command line.
-
Cool command thanks. The wiki has an error as mentioned in my OP.
-
I always thought that the lack of an eeprom was the reason for the need of a config.txt file. Just noticed this about MPG2 patent expiry?
-
Just migrated from openelec after an SD card hardware failure in my rpi2. Noticed that the licenses seem to do nothing. Booting with or without my licenses in the config.txt the same result is produced by the following:
CodeLibreELEC:~ # vcgencmd codec_enabled MPG2;vcgencmd codec_enabled WVC1 MPG2=enabled WVC1=enabled
Also the wiki page explaining how to check the license status is missing a newline in between vcgencmd commands.
Congrats on a nice looking evolution of openelec.