Posts by vanja

    OK, one last question, sorry to bother but it seems you know a lot :)

    Is there a way to add party mode to favorites?

    I found some way, if you edit party mode rules, then in creates PartyMode.xsp directly in profile folder.

    I am trying to play this playlist, but it does not behave same as clicking party mode on the side menu...

    this playlist (that I defined which sources to use) looks static, its always the same songs, and more then 10 songs...

    while, when clicking on party mode on the side menu, i get random 10 songs every time...

    EDIT: If I edit further the rule, to randomize the list, and limit it to 10, then at first it looks like party mode, but its not. after 10 songs play, thats it :)

    So I dont know whats the point of calling it PartyMode.xsp when it doesnt behave like party mode...

    EDIT2: there is an addon that can activate party mode on startup or on screensaver, but I want a button to activate it when I want (when a button on the wall is pressed, script is executed etc...)

    i tail the kodi log when party mode is fired, it runs some mqsql query to the library, picks 10 songs and says party mode activated...there must be a way to trigger it

    found it:

    import xbmc

    xbmc.executebuiltin('PlayerControl(PartyMode)')

    love it :)

    wow, thanks a lot man! alot of useful stuff!

    managed to get the .sh file working, and I can execute it from ssh shell, it plays the xsp file!

    but when i add it to favorites (the .sh System.Exec as you suggested) it fails with some errors about audio sink...it seems it trys to play on wrong sound card or something like that...

    I'm very close now, I could even script it to execute the soundtrack.sh remotely, even though its a unneccesary complication...it would be better if it worked via favorites..

    i cannot believe i can execute the script from the remote machine but kodi is not capable of executing the script from favorites


    info <general>: CAESinkALSA - Unable to open device "surround21:CARD=PCH,DEV=0" for playback

    2023-05-19 18:18:03.868 T:880151 warning <general>: Pulseaudio module module-allow-passthrough not loaded - opening PT devices might fail

    2023-05-19 18:18:03.869 T:880151 info <general>: Found 2 Lists of Devices

    2023-05-19 18:18:03.869 T:880151 info <general>: Enumerated ALSA devices:

    2023-05-19 18:18:03.869 T:880151 info <general>: Device 1

    cut

    2023-05-19 18:18:03.869 T:880151 info <general>: Device 2

    cut

    2023-05-19 18:18:03.878 T:880152 info <general>: CAESinkALSA::InitializeHW - Your hardware does not support AE_FMT_FLOAT, trying other formats

    2023-05-19 18:18:03.878 T:880152 info <general>: CAESinkALSA::InitializeHW - Using data format AE_FMT_S32NE

    2023-05-19 18:18:03.885 T:880142 warning <general>: CGUIWindowManager - HandleAction - ignoring action 122, because topmost modal dialog closing animation is running


    EDIT: forget it, found the solution

    Cannot get script to run from favourites.xml - Kodi - CoreELEC Forums

    it seems there is a problem with .sh scripts, but .py scripts work fine from the favorites!

    So i just added py script that plays xsp as:

    <favourite name="Bla">RunScript(/storage/.kodi/userdata/playlists/music/bla.py)</favourite>

    (this is the same py script that you suggested in the first place!

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

    thanks again for your help!

    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...

    actually yes, clicking from the file manager works!

    I didnt even try that, I tried executing it from ssh shell - this fails with the error above.

    but when I add it to favorites (from file manager which works and plays) - the favorite does not work.

    when I play favourite soundracks.py

    info <general>: Creating Demuxer

    2023-05-19 15:03:35.785 T:875870 error <general>: Open - error probing input format, special://profile/scripts/soundtracks.py

    2023-05-19 15:03:35.785 T:875870 error <general>: OpenDemuxStream - Error creating demuxer

    2023-05-19 15:03:35.785 T:875870 info <general>: CVideoPlayer::OnExit()

    2023-05-19 15:03:35.901 T:875715 error <general>: EXCEPTION: Kodi is not playing any file

    2023-05-19 15:03:35.979 T:875687 info <general>: CVideoPlayer::CloseFile()

    2023-05-19 15:03:35.979 T:875687 info <general>: VideoPlayer: waiting for threads to exit

    2023-05-19 15:03:35.979 T:875687 info <general>: VideoPlayer: finished waiting

    so the python script that only works within file manager of kodi is not usable to me, as I am using some home automation, integration with openhab, and i want to execute certain kodi favourites in certain scenarios....so I need it to work from favourites.


    To make a smart playlist play directly, you will need to set a #KODIPROP tag on the list item. This can be done by adding something like this to your favorites.xml:

    <item>
      <label>Soundtracks</label>
      <special>PlayMedia("special://profile/playlists/music/Soundtracks.xsp")#KODIPROP=audio</special>
    </item>

    how can I add such item to favourites.xml ?

    i tried adding it inside favourites bracket:

    Code
    <favourites>    
    <favourite something/favourite>
    <item>
    <label>Soundtracks</label>
    <special>PlayMedia("special://profile/playlists/music/Soundtracks.xsp")#KODIPROP=audio</special>
    </item>
    </favourites>

    and outside:

    Code
    <favourites>    
    <favourite something/favourite>
    </favourites>
    <item>
    <label>Soundtracks</label>
    <special>PlayMedia("special://profile/playlists/music/Soundtracks.xsp")#KODIPROP=audio</special>
    </item>

    but it didnt work, it just gets ignored, not showing on favorites list...


    so to cut the story short, I'm trying to execute XSP playlist directly, without switching on the KODI screen (TV display is OFF). so it cannot be done by clicking on the screen favorites button or file manager...

    thats great thanks!

    and is there then a way to add soundracks.py to favorites?

    is there any preffered folder to keep it, like userdata/scripts


    edit: it doesnt want to run, do I need some addon?

    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'

    Hi,

    by default, if you add your smart playlist (of music) to the favorites, it opens a window of the playlist. I'm looking for a way to play it directly.

    what i did so far:

    edited favorites.xml

    instead of openwindow, i changed it to

    >PlayMedia("special://profile/playlists/music/Soundtracks.xsp")

    this works when clicking on it on the screen.

    but when i try to play it via yatse remote:

    Play: ListItem type must be audio or video type. The type can be specified by using ListItem::getVideoInfoTag or ListItem::getMusicInfoTag, in the case of playlist entries by adding #KODIPROP mimetype value.

    it gives me this error.

    Any idea how to make it work?


    Play: ListItem type must be audio or video type. The type can be specified by using ListItem::getVideoInfoTag or ListItem::getMusicInfoTag, in the case of playlist entries by adding #KODIPROP mimetype value.

    Hi,

    My docker addon is not behaving OK after upgrade from LE 10 to LE 11 (generic x86)

    tried reinstalling it, same thing...

    tried deleting .pid file, still not starting

    the logs of the docker daemon say this is the reason why it failed:

    failed to start containerd: timeout waiting for containerd to start

    I dont have containerd service, dont know if it should be there?

    when i try to execute "containerd" from the shell, it says its running...also when I execute "dockerd" it says its running..

    but does not want to run as a service..

    the strange thing is that "docker ps" command works, and containers are running. but I notice they get restarted sometimes....so the environment is not stable without docker daemon I guess...

    here is my docker.service

    [Unit]

    Description=Docker Application Container Engine

    Documentation=https://docs.docker.com

    After=network.target

    [Service]

    Type=idle

    Environment=PATH=/bin:/sbin:/usr/bin:/usr/sbin:/storage/.kodi/addons/service.system.docker/bin

    ExecStartPre=/storage/.kodi/addons/service.system.docker/bin/docker-config

    EnvironmentFile=-/storage/.kodi/userdata/addon_data/service.system.docker/config/docker.conf

    ExecStart=/storage/.kodi/addons/service.system.docker/bin/dockerd --exec-opt native.cgroupdriver=systemd \

    --log-driver=journald \

    --group=root \

    $DOCKER_DAEMON_OPTS \

    $DOCKER_STORAGE_OPTS

    ExecReload=/bin/kill -s HUP $MAINPID

    TasksMax=8192

    LimitNOFILE=1048576

    LimitNPROC=1048576

    LimitCORE=infinity

    TimeoutStartSec=0

    Restart=on-abnormal

    [Install]

    WantedBy=multi-user.target

    Alias=docker.service


    EDIT:

    i found another service called service.system.docker.service

    this is the correct service that is actually running, I dont know why its created under this name...

    so I deleted docker.service, as he was trying to start the docker deamon again, creating mess..

    I've looked into that but was not sure it would help in my scenario, as AVR is alive and shows as connected, there is just some drop/flop in the moment that tv is switched on/off (tv is connected to AVR, and kodi is connected to AVR).

    I guess AVR does some rescan of all hdmi ports in the moment tv drops, and it confuses kodi

    Thanks, will try with getedid procedure

    EDIT: I have run getedid create, after that got a message "rebooting system in 15seconds", and it was done. my GPU is intel, so its supported.

    It did not help my issue. I tried switching ON/OFF the TV for few times, and I managed to reproduce my issue, I have kodi playing internet radio and there is no sound coming out of HDMI. if I switch the output to Bluetooth, it plays normally, back to HDMI, nothing. If I switch the TV on/off again, or toggle hdmi inputs on AVR, the issue gets fixed. Also, disabling/enabling HDMI port on the machine would help, but I dont have a way of doing it anymore...

    Hi,

    I have updated my rather old mini pc from LE10 to LE11, and now realised that xrandr utility is missing.

    This is a generic x86 version of LE....

    I was previously using it in a script on LE10 (also Generic x86) that was fixing the issue I have.

    The script was disabling and enabling hdmi port every time i switch off my TV, as sometimes audio would get cut.

    The scenario is, I am playing music/internet radio from kodi machine that is sending audio via hdmi to my home cinema system (sony), then when i switch off the TV, audio stops (in maybe 20% of cases, not everytime)

    then the script fires:

    #!/bin/sh

    export DISPLAY=":0"

    sleep 5

    xrandr --output HDMI2 --off

    sleep 1

    xrandr --output HDMI2 --auto

    and all is good again.

    now in LE11, without xrandr, I have to either toggle HDMI with a remote of the cinema amp to something else, then back to kodi hdmi input, or toggle the tv again, anyway not really convenient and cannot be scripted.

    would appreciate if someone knows about a utility I could install from repository that could do this task...

    EDIT: fixed!!!! i changed docker from bridge network to host network. also, in advancedsettings I had mysql server specified as 127.0.0.1 and now i have it as 192.168....lan ip of the kodi machine. Dunno which of the two did it, but it works now. hope it helps someone..

    Hi,

    I have exactly the same issue.

    I tried several times with a new docker from scratch, tried mariaDB and mySQL dockers, both give same results. Kodi crashes when trying to play any (local disk of file share) video.

    On top of that, I see in the kodi logs that he complains some query fails. That query actually fails in mysql console as well, so I guess kodi is sending unsupported queries to the DB.

    SQL
    SELECT albumview.*, albumartistview.* FROM albumview JOIN albumartistview ON albumview.idAlbum = albumartistview.idAlbum WHERE albumartistview.idAlbum in (SELECT albumview.idAlbum FROM albumview WHERE albumview.strAlbum != '' AND albumview.iTimesPlayed>0 ORDER BY albumview.iTimesPlayed DESC LIMIT 100) ORDER BY albumview.iTimesPlayed DESC, albumartistview.iOrder

    It seems mysql does not support "LIMIT" in certain subqueries.

    Code
    2022-08-09 19:57:34.680 T:40883   ERROR <general>: SQL: [MyMusic82] Undefined MySQL error: Code (1235)
                                                       Query: SELECT albumview.*, albumartistview.* FROM albumview JOIN albumartistview ON albumview.idAlbum = albumartistview.idAlbum WHERE albumartistview.idAlbum in (SELECT albumview.idAlbum FROM albumview WHERE albumview.strAlbum != '' AND albumview.iTimesPlayed>0 ORDER BY albumview.iTimesPlayed DESC LIMIT 100) ORDER BY albumview.iTimesPlayed DESC, albumartistview.iOrder
    
    2022-08-09 19:57:34.680 T:40883   ERROR <general>: GetTop100Albums failed
    2022-08-09 19:57:34.681 T:40883   ERROR <general>: GetDirectory - Error getting musicdb://top100/albums/

    but as I was saying, my main issue is kodi crashing when using mysql or mariadb, and working great when advancedsettings.xml is renamed.

    was thinking of trying to run the docker somewhere else (currently running on libreelec machine itself) but I don't see a reason why this would not work as I see people using it...

    OK, i managed to keep the dockers, factory reset done, dockers alive.

    i just moved data-root dir to another place outside of kodi folder, and told newly installed docker addon where is it (under /storage/.kodi/userdata/addon_data/service.system.docker/config/ - edit the yml or json here, not sure which one is it

    for future reference if someone finds this thread. but keep in mind I already moved docker permanent volumes for data outside of kodi folder.

    Hi,

    I have configured containers from ssh, so i configured them to have disk (where they keep databases etc) and scripts outside of userdata folder.

    But still, docker root_data is inside .kodi/ -

    Docker Root Dir: /storage/.kodi/userdata/addon_data/service.system.docker/docker

    so, you configured docker root dir to be in custom location? did you use a procedure such as this:

    How to move docker data directory to another location on Ubuntu
    Docker is a popular container management platform that can dramatically speed up your development workflow. It is available as a package on major Linux distrib
    www.guguweb.com

    ?

    Hi,

    I'm running LE10.0 on some old x86 celeron mini box. everything running great, but due to few years of usage, there is bunch of addons/repos and kodi crashes once per day, so I would like to give it a clean start by removing .kodi folder.

    I read on this forum that factory reset of LE is considered to be: delete .kodi, delete .cache, delete .config

    right?

    my question is: will my docker containers running on that machine survive this? I installed some docker addon from official repo and its running great.

    wouldn't like to lose them or troubleshoot what happened to them after removing these 3 folders...

    Will they continue to run without docker addon installed? if not - will they magically start working after docker addon is again installed (after clean .kodi folder is created again)?

    thanks!