(2020-04-02, 17:11)Lorenzo101 Wrote: Hello,
I've this error in my log when i try to record (shield tv using kodi leia) :
ange(128)
-->End of Python script error report<--][/syntax]
Thanks for your help resolving this issue
For those who have errors when trying to record from EPG, but their language contains special characters here's my workaround:
Edit File "/home/osmc/.kodi/addons/plugin.video.iptv.recorder/main.py"
In line 31 insert this:
Code:
reguly ={
u"ę": "e",
u"ó": "o",
u"ą": "a",
u"ś": "s",
u"ł": "l",
u"ż": "z",
u"ź": "z",
u"ć": "c",
u"ń": "n",
u"Ą": "A",
u"Ć": "C",
u"Ę": "E",
u"Ł": "L",
u"Ń": "N",
u"Ó": "O",
u"Ś": "S",
u"Ż": "Z",
u"Ź": "Z"
}
def remove_accents(do_zmiany):
wynik = []
for znak in range(len(do_zmiany)):
if reguly.get(do_zmiany[znak]):
wynik.append(reguly[do_zmiany[znak]])
else:
wynik.append(do_zmiany[znak])
return "".join(wynik)
of course if Your language is diferent than Polish than change the characters in table reguly.
In line about 575 in the function
def record_epg(channelname, name, start, stop):
after line
name = name.decode("utf8")
insert new line:
Code:
name = remove_accents(name)
it shoul be like this:
Code:
def record_epg(channelname, name, start, stop):
channelname = channelname.decode("utf8")
name = name.decode("utf8")
name = remove_accents(name)
start = get_utc_from_string(start.decode("utf8"))
stop = get_utc_from_string(stop.decode("utf8"))
log("Scheduling record for '{}: {} ({} to {})'".format(channelname, name, start, stop))
do_refresh = False
watch = False
remind = False
channelid = None
threading.Thread(target=record_once_thread,args=[None, do_refresh, watch, remind, channelid, channelname, start, stop, False, name]).start()
Save file, reboot and recording from EPG is working fine!