tv_grab_file not working on LibreELEC 9 (by MilHouse)

  • I have been through this on my sd4tvh grabber...you can follow this format change.

    original LE 8.x version format:

    settings.xml looks like this:

    Code
    <setting id="sd.username" value="" />

    so the grep looks like this...

    Code
    USERID=`grep id=\"sd.username\" $ADDON_SETTINGS | awk '{print $3 }' | sed -e "s,value=,," -e "s,\",,g"`


    in the new LE 9 version - settings.xml looks like this:

    Code
    <setting id="sd.username"></setting>

    So the grep now should look like this...

    Code
    USERID=`grep id=\"sd.username\" $ADDON_SETTINGS | awk '{print $2 }' | sed -e "s,id=\"sd.username\">,," -e "s,</setting>,,g"`

    The only caveat to this is if a setting has not been changed - it will have the text default="true" in the line like this:

    Code
    <setting id="sd.username" default="true"></setting>

    In which case, you may need to consider adding an extra substitution in there like this:

    Code
    USERID=`grep id=\"sd.username\" $ADDON_SETTINGS | awk '{print $2 }' | sed -e "s,id=\"sd.username\" default=\"true\">,," -e "s,id=\"sd.username\">,," -e "s,</setting>,,g"`

    That will make sure both version of the id part are removed.

    You should be able to copy and paste my grep line and just replace id=\"sd.username\" with the correect setting ids.

    Sorry I didn't just submit a PR - I'm not near my repo right now. Hope this helps!

  • VoSed did you just edit the tv_grab_file file on your system or did you change the files and rebuild LE?

    If the former - can you attach it here? (it will save me some time when I make the changes in my repo)

  • just edit

    Bash
    ADDON_HOME="$HOME/.kodi/userdata/addon_data/service.tvheadend42"
      ADDON_SETTINGS="$ADDON_HOME/settings.xml"
      XMLTV_TYPE=`grep id=\"XMLTV_TYPE\" $ADDON_SETTINGS | awk '{print $2 }' | sed -e "s,id=\"XMLTV_TYPE\" default=\"true\">,," -e "s,id=\"XMLTV_TYPE\">,," -e "s,</setting>,,g"`
      XMLTV_LOCATION_FILE=`grep id=\"XMLTV_LOCATION_FILE\" $ADDON_SETTINGS | awk '{print $2 }' | sed -e "s,id=\"XMLTV_LOCATION_FILE\" default=\"true\">,," -e "s,id=\"XMLTV_LOCATION_FILE\">,," -e "s,</setting>,,g"`
      XMLTV_LOCATION_WEB=`grep id=\"XMLTV_LOCATION_WEB\" $ADDON_SETTINGS | awk '{print $2 }' | sed -e "s,id=\"XMLTV_LOCATION_WEB\" default=\"true\">,," -e "s,id=\"XMLTV_LOCATION_WEB\">,," -e "s,</setting>,,g"`
      XMLTV_LOCATION_SCRIPT=`grep id=\"XMLTV_LOCATION_SCRIPT\" $ADDON_SETTINGS | awk '{print $2 }' | sed -e "s,id=\"XMLTV_LOCATION_SCRIPT\" default=\"true\">,," -e "s,id=\"XMLTV_LOCATION_SCRIPT\">,," -e "s,</setting>,,g"`

    Edited once, last by VoSed (January 3, 2018 at 9:38 AM).