2024-02-21, 10:31
Hi all,
Several years ago I adopted a subtitles add-on and its service.py file included lines like this at the top:
A GitHub [1]search finds many occurrences of them in different Kodi addon repositories.
But e.g. I don't find them in Kodi's own codebase (searched for [2]__scriptid__).
Also, in the https://kodi.wiki site add-ons documentation section there is no formal mention of them as something that needs to be present, although an [3]article there that teaches how to create a minimal GUI add-on has a couple of them.
Are these actually mandated for an add-on to work correctly? Is it a[n old] convention of some sort?
Thanks,
1. https://github.com/search?q=path%3Aservi...&type=code
2. https://github.com/search?q=repo%3Axbmc%...&type=code
3. https://kodi.wiki/view/GUI_tutorial
Several years ago I adopted a subtitles add-on and its service.py file included lines like this at the top:
Code:
__addon__ = xbmcaddon.Addon()
__author__ = __addon__.getAddonInfo("author")
__scriptid__ = __addon__.getAddonInfo("id")
__scriptname__ = __addon__.getAddonInfo("name")
__version__ = "x.y.z"
__language__ = __addon__.getLocalizedString
__cwd__ = xbmcvfs.translatePath(__addon__.getAddonInfo("path"))
__profile__ = xbmcvfs.translatePath(__addon__.getAddonInfo("profile"))
A GitHub [1]search finds many occurrences of them in different Kodi addon repositories.
But e.g. I don't find them in Kodi's own codebase (searched for [2]__scriptid__).
Also, in the https://kodi.wiki site add-ons documentation section there is no formal mention of them as something that needs to be present, although an [3]article there that teaches how to create a minimal GUI add-on has a couple of them.
Are these actually mandated for an add-on to work correctly? Is it a[n old] convention of some sort?
Thanks,
1. https://github.com/search?q=path%3Aservi...&type=code
2. https://github.com/search?q=repo%3Axbmc%...&type=code
3. https://kodi.wiki/view/GUI_tutorial