@@ -30,13 +30,15 @@ ShinySoundDetectedActionOption::ShinySoundDetectedActionOption(
3030 {
3131 {ShinySoundDetectedAction::STOP_PROGRAM, " stop" , " Stop program and go Home. Send notification." },
3232 {ShinySoundDetectedAction::NOTIFY_ON_FIRST_ONLY, " notify-first" , " Keep running. Notify on first shiny sound only." },
33+ {ShinySoundDetectedAction::NO_NOTIFICATIONS, " no-notifications" , " Keep running. Track shiny sounds without sending notifications." },
3334// {ShinySoundDetectedAction::NOTIFY_ON_ALL, "notify-all", "Keep running. Notify on all shiny sounds."},
3435 },
3536 LockMode::UNLOCK_WHILE_RUNNING,
3637 default_action
3738 )
3839 , TAKE_VIDEO(
39- " <b>Take Video:</b>" ,
40+ " <b>Take Video:</b><br>"
41+ " Records the first shiny sound using the switch capture button.<br>" ,
4042 LockMode::UNLOCK_WHILE_RUNNING,
4143 true
4244 )
@@ -84,12 +86,18 @@ bool ShinySoundDetectedActionOption::on_shiny_sound(
8486 return false ;
8587 }
8688
89+ if (action == ShinySoundDetectedAction::NO_NOTIFICATIONS && current_count > 1 ) {
90+ return false ;
91+ }
92+
8793 if (TAKE_VIDEO){
8894 context.wait_for (SCREENSHOT_DELAY);
8995 pbf_press_button (context, BUTTON_CAPTURE, 2 * TICKS_PER_SECOND, 0 );
9096 }
9197
92- send_shiny_sound_notification (env, stream, error_coefficient);
98+ if (action != ShinySoundDetectedAction::NO_NOTIFICATIONS) {
99+ send_shiny_sound_notification (env, stream, error_coefficient);
100+ }
93101
94102 return action == ShinySoundDetectedAction::STOP_PROGRAM;
95103}
@@ -141,7 +149,13 @@ bool ShinySoundHandler::on_shiny_sound(
141149 return false ;
142150 }
143151
144- m_option.send_shiny_sound_notification (env, stream, error_coefficient);
152+ if (action == ShinySoundDetectedAction::NO_NOTIFICATIONS && current_count > 1 ){
153+ return false ;
154+ }
155+
156+ if (action != ShinySoundDetectedAction::NO_NOTIFICATIONS){
157+ m_option.send_shiny_sound_notification (env, stream, error_coefficient);
158+ }
145159
146160 if (m_pending_video.load (std::memory_order_acquire)){
147161 stream.log (" Back-to-back shiny sounds. Suppressing video." , COLOR_RED);
0 commit comments