Describe the bug
A plugin can dispatch IoEvent::Repeat. The decoded routers intercept it through set_decoded_repeat_from_state, which returns false for internet radio because radio has no queue to repeat. False means "not handled", so the runtime forwards the event to the Spotify network handler and repeat changes on your real Spotify device while you are listening to radio.
To Reproduce
- Build with
--features all-sources.
- Play an internet radio station.
- From a plugin, call the scripting API that dispatches
IoEvent::Repeat (src/infra/scripting/api.rs:453).
- Open the Spotify client. Repeat changed there, on a track you are not playing.
Expected behavior
The request should be rejected while a source that cannot honour repeat owns playback, the same way the keyboard and MPRIS paths do after #373.
Root cause
The IoEvent::Repeat arm in route_local_event (src/infra/local/dispatch.rs:131) and its Subsonic and YouTube twins return whatever set_decoded_repeat_from_state gives back, and radio has no router arm for it at all. So for radio nothing consumes the event and it reaches handle_network_event.
Additional context
Found while reviewing #373. Narrow, since the keyboard and MPRIS paths are both guarded now and a plugin is the only remaining way in. Worth fixing anyway so the "a source that has no repeat does not touch Spotify's repeat" rule holds on every path rather than most of them.
Describe the bug
A plugin can dispatch
IoEvent::Repeat. The decoded routers intercept it throughset_decoded_repeat_from_state, which returns false for internet radio because radio has no queue to repeat. False means "not handled", so the runtime forwards the event to the Spotify network handler and repeat changes on your real Spotify device while you are listening to radio.To Reproduce
--features all-sources.IoEvent::Repeat(src/infra/scripting/api.rs:453).Expected behavior
The request should be rejected while a source that cannot honour repeat owns playback, the same way the keyboard and MPRIS paths do after #373.
Root cause
The
IoEvent::Repeatarm inroute_local_event(src/infra/local/dispatch.rs:131) and its Subsonic and YouTube twins return whateverset_decoded_repeat_from_stategives back, and radio has no router arm for it at all. So for radio nothing consumes the event and it reacheshandle_network_event.Additional context
Found while reviewing #373. Narrow, since the keyboard and MPRIS paths are both guarded now and a plugin is the only remaining way in. Worth fixing anyway so the "a source that has no repeat does not touch Spotify's repeat" rule holds on every path rather than most of them.