mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-22 07:15:47 +00:00
refactor(audio): extract radio playback into radio_commands
Pull audio_play_radio (~165 LOC) out of audio/commands.rs into audio/radio_commands.rs. Live-radio playback differs from main track playback: no gapless chain, no seek, no replay-gain, no preload — collecting it on its own makes both modules easier to reason about. The shared spawn_progress_task helper (still used by audio_play / audio_chain_preload / audio_resume in commands.rs and now by radio) moves from private to `pub(super)` so radio_commands can call it. A follow-up could lift it into helpers.rs proper. audio/commands.rs: 1614 → 1447 LOC. lib.rs invoke_handler updated. Cleanup: dropped now-unused imports (`super::sources::*`, `RadioLiveState`, `RadioSharedFlags`) from commands.rs.
This commit is contained in:
@@ -398,7 +398,7 @@ pub fn run() {
|
||||
audio::autoeq_commands::autoeq_entries,
|
||||
audio::autoeq_commands::autoeq_fetch_profile,
|
||||
audio::commands::audio_preload,
|
||||
audio::commands::audio_play_radio,
|
||||
audio::radio_commands::audio_play_radio,
|
||||
audio::preview::audio_preview_play,
|
||||
audio::preview::audio_preview_stop,
|
||||
audio::preview::audio_preview_stop_silent,
|
||||
|
||||
Reference in New Issue
Block a user