Skip to content

When player quits, plugin keeps trying to load image #16

@ImDevinC

Description

@ImDevinC

I am using the media plugin to set Thumbnail Background (https://github.com/StreamController/MediaPlugin/blob/main/main.py#L433) and when I close my media player, my log continuously fills with this error

2025-10-16 08:27:52.411 | ERROR    | threading:run:994 - An error has been caught in function 'run', process 'MainProcess' (1837094), thread 'own_actions_tick' (139931199846080):
Traceback (most recent call last):

  File "/usr/lib/python3.13/threading.py", line 1014, in _bootstrap
    self._bootstrap_inner()
    │    └ <function Thread._bootstrap_inner at 0x7f4a0f812ca0>
    └ <Thread(own_actions_tick, started 139931199846080)>
  File "/usr/lib/python3.13/threading.py", line 1043, in _bootstrap_inner
    self.run()
    │    └ <function Thread.run at 0x7f4a0f812a20>
    └ <Thread(own_actions_tick, started 139931199846080)>
> File "/usr/lib/python3.13/threading.py", line 994, in run
    self._target(*self._args, **self._kwargs)
    │    │        │    │        │    └ {}
    │    │        │    │        └ <Thread(own_actions_tick, started 139931199846080)>
    │    │        │    └ ()
    │    │        └ <Thread(own_actions_tick, started 139931199846080)>
    │    └ <bound method ControllerInputState.own_actions_tick of <src.backend.DeckManagement.DeckController.ControllerKeyState object a...
    └ <Thread(own_actions_tick, started 139931199846080)>

  File "/home/devin/Projects/StreamController/src/backend/DeckManagement/DeckController.py", line 1669, in own_actions_tick
    action.on_tick()
    │      └ <function ThumbnailBackground.on_tick at 0x7f49b40bb420>
    └ <plugins.com_core447_MediaPlugin.main.ThumbnailBackground object at 0x7f49b4765590>

  File "/home/devin/Projects/StreamController/data/plugins/com_core447_MediaPlugin/main.py", line 445, in on_tick
    self.update_image()
    │    └ <function ThumbnailBackground.update_image at 0x7f49b40b9b20>
    └ <plugins.com_core447_MediaPlugin.main.ThumbnailBackground object at 0x7f49b4765590>

  File "/home/devin/Projects/StreamController/data/plugins/com_core447_MediaPlugin/main.py", line 456, in update_image
    if isinstance(thumbnail[0], io.BytesIO):
                  │             │  └ <class '_io.BytesIO'>
                  │             └ <module 'io' (frozen)>
                  └ None

TypeError: 'NoneType' object is not subscriptable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions