@@ -75,19 +75,17 @@ async fn run_loop(config: Config) {
7575 previous_process_name = process_name;
7676 previous_media_metadata = media_metadata;
7777 last_time = utc_now;
78- } else {
79- if config. log_enable {
80- let next_watch_time = utc_now
81- . checked_add_signed ( chrono:: Duration :: seconds ( config. watch_time ) )
82- . unwrap ( )
83- . format ( "%Y-%m-%d %H:%M:%S" ) ;
84- let utc_now = utc_now. format ( "%Y-%m-%d %H:%M:%S" ) ;
85- println ! ( "--------------------------------------------------" ) ;
86- println ! ( "This Watch Time : {}" , utc_now) ;
87- println ! ( "No change in process or media metadata" ) ;
88- println ! ( "Next Watch Time : {}" , next_watch_time) ;
89- println ! ( "--------------------------------------------------" ) ;
90- }
78+ } else if config. log_enable {
79+ let next_watch_time = utc_now
80+ . checked_add_signed ( chrono:: Duration :: seconds ( config. watch_time ) )
81+ . unwrap ( )
82+ . format ( "%Y-%m-%d %H:%M:%S" ) ;
83+ let utc_now = utc_now. format ( "%Y-%m-%d %H:%M:%S" ) ;
84+ println ! ( "--------------------------------------------------" ) ;
85+ println ! ( "This Watch Time : {}" , utc_now) ;
86+ println ! ( "No change in process or media metadata" ) ;
87+ println ! ( "Next Watch Time : {}" , next_watch_time) ;
88+ println ! ( "--------------------------------------------------" ) ;
9189 }
9290 let sleep_interval_secs = config. watch_time . to_string ( ) . parse :: < u64 > ( ) . unwrap_or ( 5 ) ;
9391 sleep ( Duration :: from_secs ( sleep_interval_secs) ) . await ;
0 commit comments