1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

FIXED KodiCheck: Picture modus bad detection rate

Discussion in 'Bug Reports' started by Brindosch, 15 May 2016.

  1. Rick164

    Rick164 Administrator Staff Member Administrator

    Messages:
    189
    Hardware:
    RPi2, +Arduino, +AtmoOrb
  2. Brindosch

    Brindosch Active Member

    Messages:
    658
    Hardware:
    RPi1/Zero, RPi2, RPi3, +nodeMCU/ESP8266
    Thank you, will report!
     
  3. Brindosch

    Brindosch Active Member

    Messages:
    658
    Hardware:
    RPi1/Zero, RPi2, RPi3, +nodeMCU/ESP8266
    Log after hyperion start
    Code:
    ssh in:     May 18 23:17:31 osmc-sascha hyperiond[514]: KODICHECK INFO: Kodi Connected
    ssh in:     May 18 23:17:31 osmc-sascha hyperiond[514]: KODICHECK INFO: Kodi Message: {"error":{"code":-32601,"message":"Method not found."},"id":666,"jsonrpc":"2.0"}
    ssh in:     May 18 23:17:31 osmc-sascha hyperiond[514]: KODICHECK INFO: switching to OFF mode
    ssh in:     May 18 23:17:31 osmc-sascha hyperiond[514]: KODICHECK INFO: Kodi Message: {"error":{"code":-32700,"message":"Parse error."},"id":null,"jsonrpc":"2.0"}
    Picture opened
    Code:
    ssh in:     May 18 23:28:12 osmc-sascha hyperiond[514]: KODICHECK INFO: Kodi Message: {"jsonrpc":"2.0","method":"Playlist.OnAdd","params":{"data":{"item":{"file":"smb://NAS/Bilder/Chiemsee 2015/SAM_2300.JPG","type":"picture"},"playlistid":2,"position":86},"sender":"xbmc"}}
    :(

    It still throws errors on startup and no picture detection :(
     
    Last edited: 18 May 2016
  4. Brindosch

    Brindosch Active Member

    Messages:
    658
    Hardware:
    RPi1/Zero, RPi2, RPi3, +nodeMCU/ESP8266
    Okay this is funny, if i keep open the picture. Stop and start Hyperion. I will get the right message (id + picture) which the code expects. but still that additional error
    Code:
    ssh in:     May 18 23:32:09 osmc-sascha hyperiond[775]: KODICHECK INFO: Kodi Connected
    ssh in:     May 18 23:32:09 osmc-sascha hyperiond[775]: KODICHECK INFO: Kodi Message: {"id":666,"jsonrpc":"2.0","result":[{"playerid":2,"type":"picture"}]}
    ssh in:     May 18 23:32:09 osmc-sascha hyperiond[775]: KODICHECK INFO: switching to PHOTO mode
    ssh in:     May 18 23:32:09 osmc-sascha hyperiond[775]: KODICHECK INFO: Kodi Message: {"error":{"code":-32700,"message":"Parse error."},"id":null,"jsonrpc":"2.0"}
     
  5. Brindosch

    Brindosch Active Member

    Messages:
    658
    Hardware:
    RPi1/Zero, RPi2, RPi3, +nodeMCU/ESP8266
    @Rick164
    Nope, won´t work with pictures, and a error still thrown as first json message.
    You may need to play around with this a little bit for a proper solution.

    But of course! If you open a picture, stop and start hyperion it will switch to picture mode immediately

    this expects hyperion
    Code:
    KODICHECK INFO: Kodi Message: {"id":666,"jsonrpc":"2.0","result":[{"playerid":2,"type":"picture"}]}
    ssh in:     May 22 13:58:58 osmc-sascha hyperiond[1118]: KODICHECK INFO: switching to PHOTO mode
    But if you open a picture during runtime Kodi don´t throw the ID
    So this might be a kodi bug
     
    Last edited: 22 May 2016
  6. Rick164

    Rick164 Administrator Staff Member Administrator

    Messages:
    189
    Hardware:
    RPi2, +Arduino, +AtmoOrb
    That's indeed an odd error, did try it here with latest stable Kodi under Windows going back and forth between video / audio / picture without errors so maybe it's only happening on some Kodi builds?
     
  7. Brindosch

    Brindosch Active Member

    Messages:
    658
    Hardware:
    RPi1/Zero, RPi2, RPi3, +nodeMCU/ESP8266
    Hm, i use under options the Explorer, maybe this is a issue?
     
  8. Rick164

    Rick164 Administrator Staff Member Administrator

    Messages:
    189
    Hardware:
    RPi2, +Arduino, +AtmoOrb
    Do you mean a separate picture addon or explorer as in navigate to a picture folder?

    Here in Kodi I navigate to a picture folder and open one (no slideshow), once that starts it shows the picture mode active in Hyperion and once stopped and start a video it will start the video mode correctly and vice versa.
     
  9. Brindosch

    Brindosch Active Member

    Messages:
    658
    Hardware:
    RPi1/Zero, RPi2, RPi3, +nodeMCU/ESP8266
    Using the filechooser and add a folder with pictures.

    I tested again with a Kodi 17 Alpha on Windows

    result:
    Code:
    KODICHECK INFO: Kodi Message: {"jsonrpc":"2.0","method":"Playlist.OnClear","params":{"data":{"playlistid":2},"sender":"xbmc"}}{"jsonrpc":"2.0","method":"Playlist.OnAdd","params":{"data":{"item":{"file":"D:\\Eigene Bilder\\xxx2010\\2010-09-05 18.52.09.jpg","type":"picture"},"playlistid":2,"position":0},"sender":"xbmc"}}
    
    stop and start hyperion during the picture is open:
    Code:
    KODICHECK INFO: Kodi Message: {"id":666,"jsonrpc":"2.0","result":[{"playerid":2,"type":"picture"}]}
    KODICHECK INFO: switching to PHOTO mode
    
    Kodi won´t output the id at all.
    May you able to create as workaround a OR solution which reacts on the first information pattern?

    This is VERY annoying during color calibraiton.
     
  10. Paulchen-Panther

    Paulchen-Panther Moderator Staff Member Developer

    Messages:
    857
    Hardware:
    RPi1/Zero, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    @Brindosch
    Please give this a try. Replace line 64 on XBMCVideoChecker.cpp with this

    Code:
    if (reply.contains("\"method\":\"Player.OnPlay\"") || reply.contains("\"method\":\"Playlist.OnAdd\""))
     
  11. Brindosch

    Brindosch Active Member

    Messages:
    658
    Hardware:
    RPi1/Zero, RPi2, RPi3, +nodeMCU/ESP8266
    tried, sadly still the same.
    I think we need this code at the same tier as the if from "id" but just for pictures
    If i understand this -slowly- right?

    because it still just activate it, if the id was given before?

    hm we need to use this message to start the picture grabbing without the id.
    (which should be used! but won´t be send at all)
    Code:
    {"jsonrpc":"2.0","method":"Playlist.OnAdd","params":{"data":{"item":{"file":"smb://NAS/System/Farbkalibrierung  Weiᅢ゚-Gamma Hyperion Bilder/Farbbilder/magenta_FF00FF.png","type":"picture"},"playlistid":2,"position":0},"sender":"xbmc"}}
     
  12. Rick164

    Rick164 Administrator Staff Member Administrator

    Messages:
    189
    Hardware:
    RPi2, +Arduino, +AtmoOrb
    Could you test it with the below code?
    Basically as a last if it will match it against picture and playlist.OnAdd without id.

     
  13. Brindosch

    Brindosch Active Member

    Messages:
    658
    Hardware:
    RPi1/Zero, RPi2, RPi3, +nodeMCU/ESP8266
    @Rick164
    yes, thats it!
    //fixed

    tested with diashow and single photo watching with file manager.
    no strange or misleading behaviour it switches back to menu "modus" and to picture if you watch picture(s).
     
    • Like Like x 2