eclispe / rydeplayer

Ryde Player provides a on screen interface and video player for Longmynd compatible tuners.
GNU General Public License v3.0
4 stars 6 forks source link

Handle error when no display found #30

Closed eclispe closed 2 years ago

eclispe commented 4 years ago

On the Raspberry Pi 4 when composite is disabled and no HDMI is attached it crashes on start:

Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/pi/ryde/rydeplayer/__main__.py", line 20, in <module>
    player.run()
  File "/home/pi/ryde/rydeplayer/player.py", line 315, in run
    newplayer = player('config.yaml')
  File "/home/pi/ryde/rydeplayer/player.py", line 217, in __init__
    self.theme = Theme(pydispmanx.getDisplaySize())
  File "/home/pi/ryde/rydeplayer/player.py", line 37, in __init__
    self.menuWidth = int(displaySize[0]/4)
TypeError: 'bool' object is not subscriptable
eclispe commented 2 years ago

requires https://github.com/eclispe/pyDispmanx/issues/3