rols1 / Kodi-Addon-ARDundZDF

Kodi Addon für die Mediatheken von ARD + ZDF, Live-TV, Live-Radio, Radio-Podcasts / ARD-Audiothek, Downloads. Forum kodinerds: https://www.kodinerds.net/index.php/Thread/64244-RELEASE-Kodi-Addon-ARDundZDF/
MIT License
43 stars 7 forks source link

ZDF uses semicolon in video description; bug with python2 #28

Closed mosterta closed 1 year ago

mosterta commented 1 year ago

ZDF uses semicolon in video description. The description is added with other parameters into an URL. When parsing and spliting the URL in python2 the semicolon is used as a separator which leads to a wrong data in the resulting dictionary and video cannot be found by video player.

Semicolon is replaced by "." instead and everything works again in python2

rols1 commented 1 year ago

I had not noticed the problem, because I test changes mainly with Kodi Matrix. So thanks again for the hint about the dict problem. I had pushed your patch this morning as a single update, but in the meantime integrated it into an extension of the valid_title_chars function (util). It is called in ZDF_get_content, so is not limited to ZDF_PageMenu, where your patch was. In valid_title_chars, the semicolon is then eliminated along with other router incompatible characters. This makes the calls to repl_json_chars dispensable. But I remove these sporadically and when I have a better day (2 ugly typos this morning).

mosterta commented 1 year ago

basically I did just a quick & dirty hack to get ZDF mediathek running again on my production system. I pushed the hack to make you aware of the difference in behavior between python2 and python3 code. Therefore I am completely fine if you rework and/or integrate the change in different way into the production code. Thanks for making all the efforts to adapt for changes in the ZDF json format/mediathek.