Problem with dir names in "Movies"
When directory on box is created with national char ... f.eg. "ádir", owif crashed in movies.py in def getMovieList(rargs=None, locations=None) when you in "Movies" try select this dir
` File "/usr/lib/enigma2/python/Plugins/Extensions/OpenWebif/controllers/ajax.py", line 192, in P_movies movies = getMovieList(request.args) File "/usr/lib/enigma2/python/Plugins/Extensions/OpenWebif/controllers/models/movies.py", line 127, in getMovieList directory = getUrlArg2(rargs, "dirname") File "/usr/lib/enigma2/python/Plugins/Extensions/OpenWebif/controllers/utilities.py", line 303, in getUrlArg2 return six.ensure_str(args[k][0]) File "/usr/lib/python3.9/site-packages/six.py", line 917, in ensure_str
builtins.UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe1 in position 17: invalid continuation byte `
This incomming wrong from enigma and should be fixed on e2 side or in Owif ?
Problem is "áoř" ... "á" is incomming as lat1, "ř" is incomming in unicode:
({b'dirname': [b'/media/hdd/movie/\xe1o%u0159']})
Temporary how fix, I didn't search further (but I don't want to use that).
import re
...
if b'dirname' in rargs:
decoded_str = rargs[b'dirname'][0].decode('latin-1')
decoded_str = re.sub(r'%u([0-9A-Fa-f]{4})', lambda m: chr(int(m.group(1), 16)), decoded_str)
rargs[b'dirname'][0] = decoded_str.encode('utf-8')
Hy could you test the behavior again now?
The problem with Openwebif seems to be that unfortunately no one has really maintained the json interface in particular. Yesterday I dealt with it a bit, so that some errors can be fixed again. Currently, it is still the Openwebif for any stable pli image. You can also see 3 PR that I initiated myself via bot. They have not yet been added by me, because the version jump is very high.
If you want, you can also test it against, the easiest way is to change it locally to my fork.
Greetings and thanks
I am using homebuild with my patche for national chars and no problems more in Movies via Webif. Without it owif crashes on dir with nat. chars still.
Maybe you would like to test it with the updates of the .js programs. You don't need to build again, the files are all on Github. Github builds it itself, via script in separate branch. https://github.com/kueken/e2openplugin-OpenWebif/blob/gh-pages/enigma2-plugin-extensions-openwebif_1.5.2-git20250617-r1_all.ipk By the way, error messages are all logged. They can be viewed and processed accordingly. https://github.com/kueken/e2openplugin-OpenWebif/blob/gh-pages/flake8_report.txt https://github.com/kueken/e2openplugin-OpenWebif/blob/gh-pages/jshint1_report.txt https://github.com/kueken/e2openplugin-OpenWebif/blob/gh-pages/jshint2_report.txt For the python files and the js files.
But without a double checkt, I will rather not change it, because I really lack the experience for that.
I tried your plugin from the link you posted (renamed the original to OpenWebif_old, unzipped and copied yours in its place — it includes pycache, so I couldn’t have made a mistake). Restarted, and switching to a directory with national characters was OK. But I found that your version already includes my fix. I commented it out, restarted, and tested again — and OWIF crashed, when is directiry selected, again.
Thanks for the feedback. The fix is deliberately in it, I am more concerned with the updates that are initiated autmatically, provided that you can use departabot. The js dependencies have not been updated for a long time and should in principle be kept up to date.
So with the fix it had everything worked perfectly even with the current compiled JS environment? That was important to me, because then I would also accept the PR from the Depenadabot previously generated in the original branch.
Thank you