Files
jellycon/default.py
mani a71efe14c1
Some checks failed
Build JellyCon / build (py2) (push) Has been cancelled
Build JellyCon / build (py3) (push) Has been cancelled
CodeQL Analysis / analyze (python, 3.9) (push) Has been cancelled
Release Drafter / Update release draft (push) Has been cancelled
Test JellyCon / test (3.9) (push) Has been cancelled
Properly fix intermittent installation failures
Instead of setting addon variables to None (which causes issues),
fix the root cause by removing unnecessary module-level initialization:

- Remove module-level user_details loading in functions.py
- Load user_details locally in functions where actually needed
- Wrap remaining module-level addon access in try/except in:
  - service.py (log_timing_data)
  - default.py (log_timing_data)
  - kodi_utils.py (addon variable)
  - functions.py (__addon__ and related variables)

This prevents crashes during installation/update while avoiding
None-related issues during normal operation.
2026-01-06 01:12:59 +01:00

23 lines
579 B
Python

# Gnu General Public License - see LICENSE.TXT
import xbmcaddon
from resources.lib.lazylogger import LazyLogger
from resources.lib.functions import main_entry_point
from resources.lib.tracking import set_timing_enabled
log = LazyLogger('default')
try:
settings = xbmcaddon.Addon()
log_timing_data = settings.getSetting('log_timing') == "true"
if log_timing_data:
set_timing_enabled(True)
except Exception:
# During installation/update, addon might not be fully registered yet
pass
log.debug("About to enter mainEntryPoint()")
main_entry_point()