phijor / mopidy-notify Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
ERROR 2023-08-08 13:30:15,290 [27475:NotifyFrontend-18 (_actor_loop)] mopidy.listener
Triggering event failed: track_playback_started(tl_track)
Traceback (most recent call last):
File "/home/abadger/.local/lib/python3.11/site-packages/mopidy/listener.py", line 44, in on_event
getattr(self, event)(**kwargs)
File "/home/abadger/.local/lib/python3.11/site-packages/mopidy_notify/frontend.py", line 43, in track_playback_started
self.show_notification(tl_track)
File "/home/abadger/.local/lib/python3.11/site-packages/mopidy_notify/frontend.py", line 75, in show_notification
icon = self.fetch_icon(track.uri)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/abadger/.local/lib/python3.11/site-packages/mopidy_notify/frontend.py", line 127, in fetch_icon
preferred = self.find_preferred_image(images)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/abadger/.local/lib/python3.11/site-packages/mopidy_notify/frontend.py", line 107, in find_preferred_image
acceptable = [i for i in images if i.width <= self.ext_config["max_icon_size"]]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/abadger/.local/lib/python3.11/site-packages/mopidy_notify/frontend.py", line 107, in <listcomp>
acceptable = [i for i in images if i.width <= self.ext_config["max_icon_size"]]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '<=' not supported between instances of 'NoneType' and 'int'
It seems that some Mopidy backends will supply an icon with each track, but the icons are all 'None' objects. mopidy-notify does not expect this and throws an exception instead of ignoring the invalid image.
So far I've had this happen with every track from the following backends:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.