romcollectionbrowser
romcollectionbrowser copied to clipboard
Disable/hide context menu items when no collections setup
When no collections have been setup, several context menu items don't have any relevance and should be hidden:
- Edit Rom Collection
- Delete Rom Collection
- Delete Game
These will throw exceptions when opened:
22:49:58 T:123145311502336 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.AttributeError'>
Error Contents: 'NoneType' object has no attribute 'keys'
Traceback (most recent call last):
File "/Users/bruny/Library/Application Support/Kodi/addons/script.games.rom.collection.browser/resources/lib/dialogeditromcollection.py", line 89, in onInit
for rcId in self.romCollections.keys():
AttributeError: 'NoneType' object has no attribute 'keys'
-->End of Python script error report<--