I have latest LE build with installed tvheadend. I can't setup xmltv because tv_grab_file not working. It does nothing. How I can fix this?
tv_grab_file not working on LibreELEC 9 (by MilHouse)
-
VoSed -
January 2, 2018 at 11:57 AM -
Thread is Unresolved
-
-
- Official Post
yes this is known but not fixed yet LibreELEC.tv/tv_grab_file at master · LibreELEC/LibreELEC.tv · GitHub
needs to be changed to work with the "new way" similar to
Fix parsing settings.xml file by vpeter4 · Pull Request #2168 · LibreELEC/LibreELEC.tv · GitHub
-
So how I can get working script?
-
- Official Post
yea if I would know it I had already changed it
-
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:
so the grep looks like this...
CodeUSERID=`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:
So the grep now should look like this...
CodeUSERID=`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:
In which case, you may need to consider adding an extra substitution in there like this:
CodeUSERID=`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!
-
- Official Post
Could you submit a pr whenever you are near your box ? I have no knowledge about that part and no proper way in testing this. Isn't too urgent so time is no problem.
-
Will do - I'll see if I can test it tonight.
-
You should be able to copy and paste my grep line and just replace id=\"sd.username\" with the correect setting ids.
It works!
-
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
BashADDON_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"`
-
submitted the PR