bugfix, musicdb-find_and_add_missing_songs tests

This commit is contained in:
Mark
2024-08-26 20:55:30 +02:00
parent 9f12c2e80a
commit 1708fa9a90
10 changed files with 1138 additions and 21 deletions

View File

@@ -0,0 +1,22 @@
// define handlers
on_resume := () -> "Resumed".eprintln
on_pause := () -> "Paused".eprintln
on_next_song := () -> "Next song".eprintln
on_library_changed := () -> "Library changed".eprintln
on_queue_changed := () -> "Queue changed".eprintln
on_notification_received := (title, content) -> ("Notif:\n - ", title, " -\n", content).concat.eprintln
// use handlers to handle events
on_resume.handle_event_resume
on_pause.handle_event_pause
on_next_song.handle_event_next_song
on_library_changed.handle_event_library_changed
on_queue_changed.handle_event_queue_changed
on_notification_received.handle_event_notification_received
// because on_resume won't be called if playback was resumed before this client connected
if ().get_playing {
"Resumed (was playing)".eprintln
}
().loop(() -> 60.sleep)