The whole `_update_devices` for loop should be covered by a try-except
block. That's because custom attribute getters may be invoked also after
expanding the results, resulting in unhandled `SmartDeviceException`.
The latest release of SQLAlchemy 2.x has apparently removed the
`autocommit` implicit logic for good.
Mutations should be explicitly wrapped into `with ... begin()` blocks,
or they will be rolled back when the connection is closed.
- Compare the serialized versions of the cache before and after, minus
the saved/loaded timestamps, rather than marking the cache as dirty
after a set.
- `Date` and `DateTime` schema fields should have static default values,
or those values will change on every run.
- Always sort all the sets before serializing them.
The format of the `MpvEvent*` classes, the data passed to the event
callback and the available event type enum fields have all changed
between python-mpv < 1.0.0 and >= 1.0.0.
This change makes things work with all mpv + python-mpv versions.
The VLC event callback handler shouldn't try and access the media and/or
the MRL while processing a `MediaPlayerTitleChanged` event.
It seems that in some particular streaming cases (mostly reproducible
with Jellyfin media URLs) this may result in deadlocks - probably
because the media metadata is being handled within the HTTP request, and
the callback handler runs within the same context.
The player may sometimes stop, or the VLC instance crash, without
sending a stop event.
This may leave the Platypush plugin in a PLAYING state, and the instance
may not be properly cleaned up.
This commit adds a polling logic to the monitor thread to verify every
second if the player is still running, and terminate the instance if
that's not the case.