Closed KarellenX closed 1 year ago
The scraper settings definition are the old format. That file was just copied from the original scraper a long time ago and never updated.
https://github.com/xbmc/metadata.themoviedb.org.python/blob/master/resources/settings.xml
@rmrector
I've made an attempt to convert the settings file. There are a couple of setting I could not figure out, but I have commented them, hopefully you can fix. The rest seem to work on my local install.
Could you check please... https://paste.kodi.tv/woluzabesi.kodi
Cheers.
How well does it work on Kodi 18? Now that I see it, there might have been an issue with unlocalized <option>
in the early implementation.
Did you try ronie's converter addon? It might be able to match that up.
I didn't test on v18.
I didn't try ronie's converter either. I sat down and plugged away following the wiki page trying to recreate the settings. https://kodi.wiki/view/Add-on_settings_conversion Oh, bugger, now that I look at ronies script, it could have done it for me. I spent well over an hour figuring that out :)
I thought if I did most of it, you could fix where I got it wrong or add what I ommitted.
I just tried running the script from @ronie but it does not like one of the settings
EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'ValueError'>
Error Contents: invalid literal for int() with base 10: 'Fanart.tv'
Traceback (most recent call last):
File "C:\KODI\KODI- v19 nightlies\portable_data\addons\script.settings-convert\default.py", line 844, in <module>
Main()
File "C:\KODI\KODI- v19 nightlies\portable_data\addons\script.settings-convert\default.py", line 47, in __init__
newsettings = self.updateSettings(settingsxml)
File "C:\KODI\KODI- v19 nightlies\portable_data\addons\script.settings-convert\default.py", line 110, in updateSettings
catid = xbmcaddon.Addon(self.id).getLocalizedString(int(catlabel))
ValueError: invalid literal for int() with base 10: 'Fanart.tv'
-->End of Python script error report<--
it's crashing due to this line:
https://github.com/xbmc/metadata.themoviedb.org.python/blob/9a786c8933e608aed8a3b31b651b13e662f9e3ab/resources/settings.xml#L22
category labels are expected to be a LOCALIZE[]
string instead of hardcoded text.
if you change that line to <category>
the conversion script should finish successfully.
once done, you manually need to re-add the category label in the new settings file.
Ya, Kodi 18 support blocks this for now. I may be down with dropping that from regular releases before long, though.
oops forgot about this.
Thanks @ronie that did fix the issue.
@rmrector now that I know it is so simple to create the new settings, I'll leave it in your hands for if and when you feel like updating it. Sounds like it will happen after you drop support for v18. But yell out if you need a hand.
@rmrector If you do update the settings, could you also consider reorganising the order of the settings. Some are a bit jumbled, like the two certification settings are separated, same with the two language settings. Also the Ratings settings are dependent on each other, so maybe indent them?
fanart.tv...
In Kodi v19, I have been seeing the following message for a little while. Do you know why it happens? What settings are in the old format?