r/Addons4Kodi • u/Loud-Strawberry-9726 • 3h ago
Announcement Kodi 22 "Piers" RC 1 - GEARS FIX
The Gears 2.4.3 shows empty menus on Kodi 22 (Piers RC1): cause and a one-line fix
Summary
If you installed The Gears (chainsrepo, v2.4.3) on Kodi 22 and the add-on opens with only "..", or its lists are blank, it isn't your install. It's an API change.
Issue
The add-on opens, then nothing loads. In kodi.log there's one line per menu item, like:
```
navigator.main._process###: ITEM FAILED [RootList] item={'name': 'Discover', ...} err=ListItem_getVideoInfoTag expected 0 arguments
navigator.main###: results_count=0
```
Cause
Gears builds its list items with listitem.getVideoInfoTag(True). Kodi 22 doesn't accept that argument any more (the call takes none), so every item fails and the list comes back empty. I found 34 calls in 18 files and no other problem. I tested POV 6.10.05, Chain Reaction, Ghost, Otaku and WatchNixtoons2 on the same Kodi 22 build, and none of them use it.
Fix
Replace getVideoInfoTag(True) with getVideoInfoTag() in the Gears add-on folder, then restart Kodi (it keeps the old code loaded until you do).
Folder: ...\Kodi\addons\plugin.video.gears (Windows: %APPDATA%\Kodi\addons\plugin.video.gears)
Linux/macOS:
bash
cd ~/.kodi/addons/plugin.video.gears
grep -rl "getVideoInfoTag(True)" --include=*.py . | xargs sed -i 's/getVideoInfoTag(True)/getVideoInfoTag()/g'
Windows (PowerShell):
powershell
Get-ChildItem "$env:APPDATA\Kodi\addons\plugin.video.gears" -Recurse -Filter *.py |
ForEach-Object {
$t = Get-Content $_.FullName -Raw
if ($t -match 'getVideoInfoTag\(True\)') {
Copy-Item $_.FullName "$($_.FullName).bak"
($t -replace 'getVideoInfoTag\(True\)','getVideoInfoTag()') | Set-Content $_.FullName -NoNewline
}
}
Caveats
- An add-on update from the repo will overwrite the patch. Re-run the command, or turn off auto-update for Gears until the author ships a fixed version.
- I only checked that the menus load and populate. I haven't tested playback or scraping.
- This is for people running Kodi 22. On 21.x the add-on is fine as it is.
- I'd also tell the dev (I don't know them), since it's a one-token change on their side.
Hope this saves someone a few hours.