When a song begins playing on Tidal, multiple TIME_UPDATE events are sent quickly (<1ms apart). This ocassionally results in a race condition on Discord, where the activity becomes duplicated. Fixed by using old timestamps if the new one is less than 100ms apart.
Additionally, I moved the native logic into the plugin's code instead of the lib's native bridge, and cleaned it up a bit. This shrinks the size of the plugin considerably, from ~1.2mb to ~600kb.
When a song begins playing on Tidal, multiple
TIME_UPDATE
events are sent quickly (<1ms apart). This ocassionally results in a race condition on Discord, where the activity becomes duplicated. Fixed by using old timestamps if the new one is less than 100ms apart.Additionally, I moved the native logic into the plugin's code instead of the lib's native bridge, and cleaned it up a bit. This shrinks the size of the plugin considerably, from ~1.2mb to ~600kb.