Posts by Mario77

    Ah, really sorry have tried searching everywhere for this information - it's very basic, but how can I see the file path? My video is called "perennialseries.mp4" and is located on an external SSD called "T7" which is plugged into my Raspberry Pi. I can't seem to find the file path information anywhere.

    Is it in a directory/folder on the ssd?

    If not it should be

    /var/media/T7/perennialseries.mp4

    Thanks so much Mario, will try this and see how it goes. Just checking - do I need to enter this code via SSH Terminal on my Mac?

    Sorry never touched a mac in my life...but if you have access to your libreelec via ssh terminal just copy all the following code at once and paste it in your terminal...you might need to press enter more then once for all commands to run...

    Dont forget to change MOTION_PIN = 11 to your motion detector pin you are using...

    Something to start with...

    Just to give you an idea what you need...

    change pin 11 to your motion gpio pin...remove debugging when done if you don't want logging...

    not tested..


    Now I just seen that you wanted to pause and play not stop and play so you might need to change some of the script but at least try and see if it works this way..

    I setted up the bluetooth connection in the described way but my sound is super distorted and cuts off, especially in the beginning after connecting. Anybody with the same problem or know a solution?

    Try this:

    First connect your bluetooth source from LE settings addon..then run this..

    Bash
    #!/bin/sh
    systemctl stop kodi
    pactl load-module module-udev-detect 2>/dev/null
    sink=`pactl list short sinks | grep 'alsa' | awk '{print $2}' | grep 'hdmi'`
    source=`pactl list short sources | grep bluez | awk '{print $2}'`
    pactl set-default-sink $sink
    pactl set-default-source $source
    systemctl start kodi

    Probably a corrupted profile.json of the Audio Profiles add-on

    remove it's settings directory ,reboot and set it up again..

    Code
    rm -rf /storage/.kodi/userdata/addon_data/script.audio.profiles

    if that doesn't work

    Code
    rm -rf /storage/.kodi/userdata/addon_data/script.audio.profiles && rm /storage/.kodi/userdata/guisettings.xml

    well, sort of. everything works on the kodi gui itself (py or sh scripts as favorites) but 3rd party apps that connect via API do not handle it well. (like yatse, openhab...)

    I guess they expect some media in favorites, and RunScript just breaks them. yatse claims invalid favourite, and some of them it cannot even see....at some point they even crash kodi by attempting to "play" scripts or whatnot.

    so I gave up and I am doing kodi-send --action='RunScript and Playmedia - from remote machine, its good enough

    ok so if you r doing kodi send you can still use party mode...here you go:

    Quote

    kodi-send --action="PlayerControl(Partymode(/some/path/to/a/file/Soundtracks.xsp))"

    I guess adding it to favorites via right click is wrong, who knows what he did instead of RunScript.

    Probably favorites is just added as PlayMedia by default..so your first issue is solved?

    you need something like this for partymode in your Soundtracks.py no need of addons:

    Code
    import xbmc
    xbmc.executebuiltin( "PlayerControl(Partymode(/some/path/to/a/file/Soundtracks.xsp))" )

    quick workaround

    create also Soundtracks.sh in same folder of Soundtracks.py with this line

    Code
    kodi-send --action='RunScript("path/to/your/soundtracks.py")'

    then add favorite manually like this

    Code
    <favourite name="soundtracks">System.Exec(/path/to/your/Soundtracks.sh)</favourite>

    tested - working


    you can also try this might also work - not tested

    Edit: you can probably also start your playlist from the soundtracks.sh by changing line to

    Code
    kodi-send --action="PlayMedia(/some/path/to/a/file/Soundtracks.xsp)"

    I tried executing it from ssh shell - this fails with the error above.

    You can't do that it won't work as you need to run it internally so for testing in ssh you run

    Code
    kodi-send --action='RunScript("path/to/your/soundtracks.py")'

    tvpc:~/.kodi/userdata/scripts # python soundtracks.py

    Traceback (most recent call last):

    File "/storage/.kodi/userdata/scripts/soundtracks.py", line 1, in <module>

    import xbmc

    ModuleNotFoundError: No module named 'xbmc'

    it's working for me..no addons needed

    just run these 2 commands

    Code
    dos2unix /storage/.kodi/userdata/scripts/soundtracks.py
    chmod +x /storage/.kodi/userdata/scripts/soundtracks.py

    Just clicking on it from file manager should work..you can add to favourites from there...