@@ -1047,13 +1047,17 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {
10471047 this . DB_SERVERS = DEFAULT_DB_SERVERS ;
10481048 }
10491049
1050- spawnCommandLineAsync ( "bash -c '%s/stop-mpv-else-recordings.sh'" . format ( SCRIPTS_DIR ) ) ;
1051- spawnCommandLineAsync ( "bash -c '%s/create-db-server-list.sh'" . format ( SCRIPTS_DIR ) ) ;
1050+ //~ spawnCommandLineAsync("bash -c '%s/stop-mpv-else-recordings.sh'".format(SCRIPTS_DIR));
1051+ //~ spawnCommandLineAsync("bash -c '%s/create-db-server-list.sh'".format(SCRIPTS_DIR));
1052+ spawnCommandLine ( "/usr/bin/env bash -c '%s/stop-mpv-else-recordings.sh'" . format ( SCRIPTS_DIR ) ) ;
1053+ spawnCommandLine ( "/usr/bin/env bash -c '%s/create-db-server-list.sh'" . format ( SCRIPTS_DIR ) ) ;
10521054
10531055 file_set_contents ( MPV_TITLE_FILE , "" ) ;
10541056 // Ensure right permissions and structure:
1055- spawnCommandLineAsync ( "bash -c 'cd " + SCRIPTS_DIR + " && chmod 755 *.sh *.py'" ) ;
1056- spawnCommandLineAsync ( "bash -c 'cd " + SCRIPTS_DIR + " && chmod 700 *.lua'" ) ;
1057+ //~ spawnCommandLineAsync("/usr/bin/env bash -c 'cd "+ SCRIPTS_DIR + " && chmod 755 *.sh *.py'");
1058+ //~ spawnCommandLineAsync("/usr/bin/env bash -c 'cd "+ SCRIPTS_DIR + " && chmod 700 *.lua'");
1059+ spawnCommandLine ( "/usr/bin/env bash -c 'cd " + SCRIPTS_DIR + " && chmod 755 *.sh *.py'" ) ;
1060+ spawnCommandLine ( "/usr/bin/env bash -c 'cd " + SCRIPTS_DIR + " && chmod 700 *.lua'" ) ;
10571061
10581062 if ( ! file_test ( RADIO30_CACHE , FileTest . EXISTS ) )
10591063 mkdir_with_parents ( RADIO30_CACHE , 0o755 ) ;
@@ -1067,9 +1071,11 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {
10671071 mkdir_with_parents ( SONG_ART_DIR , 0o755 ) ;
10681072 if ( ! file_test ( ALBUMART_PICS_DIR , FileTest . EXISTS ) )
10691073 mkdir_with_parents ( ALBUMART_PICS_DIR , 0o755 ) ;
1070- spawnCommandLineAsync ( "bash -c 'cp -a " + APPLET_DIR + "/stations/Radio3.0_*.json " + RADIO_LISTS_DIR + "/'" ) ;
1074+ //~ spawnCommandLineAsync("/usr/bin/env bash -c 'cp -a "+ APPLET_DIR +"/stations/Radio3.0_*.json "+ RADIO_LISTS_DIR +"/'");
1075+ spawnCommandLine ( "/usr/bin/env bash -c 'cp -a " + APPLET_DIR + "/stations/Radio3.0_*.json " + RADIO_LISTS_DIR + "/'" ) ;
10711076 if ( ! file_test ( DOT_CONFIG_DIR + "/icon.svg" , FileTest . EXISTS ) ) {
1072- spawnCommandLineAsync ( "bash -c 'cp -a " + APPLET_ICON + " " + DOT_CONFIG_DIR + "/'" )
1077+ //~ spawnCommandLineAsync("/usr/bin/env bash -c 'cp -a "+ APPLET_ICON +" "+ DOT_CONFIG_DIR +"/'")
1078+ spawnCommandLine ( "/usr/bin/env bash -c 'cp -a " + APPLET_ICON + " " + DOT_CONFIG_DIR + "/'" )
10731079 }
10741080
10751081 this . set_folders_icon ( ) ;
@@ -2778,13 +2784,13 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {
27782784 brainz_item . label . clutterText . line_wrap_mode = WrapMode . WORD_CHAR ;
27792785 brainz_item . label . clutterText . ellipsize = EllipsizeMode . NONE ;
27802786 brainz_item . connect ( 'activate' , ( ) => {
2781- spawnCommandLineAsync ( "xdg-open " + brainz_link ) ;
2787+ spawnCommandLine ( "xdg-open " + brainz_link ) ;
27822788 } ) ;
27832789 this . menu . addMenuItem ( brainz_item ) ;
27842790
27852791 let yt_watch_item = new PopupIconMenuItem ( formatTextWrap ( _ ( "Watch on YT" ) , WRAP_LENGTH ) , "media-playback-start" , IconType . SYMBOLIC , { reactive : true } ) ;
27862792 yt_watch_item . connect ( 'activate' , ( ) => {
2787- spawnCommandLineAsync ( "xdg-open " + yt_watch_link ) ;
2793+ spawnCommandLine ( "xdg-open " + yt_watch_link ) ;
27882794 } ) ;
27892795 this . menu . addMenuItem ( yt_watch_item ) ;
27902796
@@ -2861,7 +2867,7 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {
28612867 item_homepage = null ;
28622868 if ( homepage && homepage != 'null' && homepage . length > 0 ) {
28632869 item_homepage = new PopupIconMenuItem ( formatTextWrap ( _ ( "Visit the home page of this station" ) , WRAP_LENGTH ) , "web-browser" , IconType . SYMBOLIC , { reactive : true } ) ;
2864- item_homepage . connect ( 'activate' , ( ) => { spawnCommandLineAsync ( `xdg-open ${ homepage } ` ) } ) ;
2870+ item_homepage . connect ( 'activate' , ( ) => { spawnCommandLine ( `xdg-open ${ homepage } ` ) } ) ;
28652871 }
28662872 }
28672873
@@ -3160,7 +3166,7 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {
31603166 ) ;
31613167
31623168 if ( file_test ( yt_dl_proc_dir , FileTest . EXISTS ) ) {
3163- let progress_pid = spawnCommandLineAsync ( " bash -c '%s/progress.sh %s'". format (
3169+ let progress_pid = spawnCommandLine ( "/usr/bin/env bash -c '%s/progress.sh %s'". format (
31643170 SCRIPTS_DIR ,
31653171 "" + yt_dl_pid
31663172 ) ) ;
@@ -3280,7 +3286,7 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {
32803286 "" + title ,
32813287 [ _ ( "Open the recordings folder" ) ,
32823288 "callback" ,
3283- ( ) => { spawnCommandLineAsync ( ` bash -c 'xdg-open "%s"'`. format ( dir ) ) }
3289+ ( ) => { spawnCommandLine ( `/usr/bin/env bash -c 'xdg-open "%s"'`. format ( dir ) ) }
32843290 ]
32853291 )
32863292 } else {
@@ -3289,16 +3295,16 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {
32893295 _ ( "Please check this record." ) + "\n" + yt_dl_errMsg . trim ( ) ,
32903296 [ _ ( "Open the recordings folder" ) ,
32913297 "callback" ,
3292- ( ) => { spawnCommandLineAsync ( ` bash -c 'xdg-open "%s"'`. format ( RADIO30_MUSIC_DIR ) ) }
3298+ ( ) => { spawnCommandLine ( `/usr/bin/env bash -c 'xdg-open "%s"'`. format ( RADIO30_MUSIC_DIR ) ) }
32933299 ]
32943300 )
32953301 }
32963302 this . change_symbolic_icon ( ) ;
32973303 finished ( ) ;
32983304 this . settings . setValue ( "recordings-extract-update" , 0.0 ) ;
32993305 this . settings . setValue ( "show-recordings-extract-update" , false ) ;
3300- spawnCommandLine ( `bash -c "kill -15 %s"` . format ( "" + progress_pid ) ) ;
3301- spawnCommandLine ( `bash -c "rm -f %s"` . format ( progress_filepath . replace ( "progress" , "*" ) ) ) ;
3306+ spawnCommandLine ( `/usr/bin/env bash -c "kill -15 %s"` . format ( "" + progress_pid ) ) ;
3307+ spawnCommandLine ( `/usr/bin/env bash -c "rm -f %s"` . format ( progress_filepath . replace ( "progress" , "*" ) ) ) ;
33023308 if ( this . yt_downloads . indexOf ( title ) > - 1 ) {
33033309 let index = this . yt_downloads . indexOf ( title ) ;
33043310 this . yt_downloads . splice ( index , 1 ) ;
@@ -3307,7 +3313,8 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {
33073313 if ( this . yt_downloads . length === 0 ) {
33083314 // No more download to do.
33093315 // Empty cache directory to avoid future 'HTTP Error 403: Forbidden':
3310- spawnCommandLineAsync ( `bash -c "sleep 0.5 && %s --rm-cache-dir"` . format ( YTDL_PROGRAM ( ) ) )
3316+ //~ spawnCommandLineAsync(`bash -c "sleep 0.5 && %s --rm-cache-dir"`.format(YTDL_PROGRAM()))
3317+ spawnCommandLine ( `/usr/bin/env bash -c "sleep 0.5 && %s --rm-cache-dir"` . format ( YTDL_PROGRAM ( ) ) )
33113318 }
33123319 return false
33133320 }
@@ -3451,7 +3458,8 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {
34513458 if ( ! file_test ( XDG_RUNTIME_DIR + "/mpv_radio_PID" , FileTest . EXISTS ) ) return ;
34523459
34533460 let command = `${ SCRIPTS_DIR } /get_song_art.sh "${ title } " "${ res } " &` ;
3454- spawnCommandLineAsync ( command ) ;
3461+ //~ spawnCommandLineAsync(command);
3462+ spawnCommandLine ( command ) ;
34553463 timeout_add_seconds ( 30 , ( ) => {
34563464 let dir = file_new_for_path ( ALBUMART_PICS_DIR ) ;
34573465 let children = dir . enumerate_children ( "standard::*" , FileQueryInfoFlags . NONE , null ) ;
@@ -4083,7 +4091,8 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {
40834091 if ( ! are_translations_installed ( ) ) install_translations ( ) ;
40844092
40854093 this . del_song_arts ( ) ;
4086- spawnCommandLineAsync ( "bash -c '%s/fix-desklet-translations.sh'" . format ( SCRIPTS_DIR ) ) ;
4094+ //~ spawnCommandLineAsync("bash -c '%s/fix-desklet-translations.sh'".format(SCRIPTS_DIR));
4095+ spawnCommandLine ( "/usr/bin/env bash -c '%s/fix-desklet-translations.sh'" . format ( SCRIPTS_DIR ) ) ;
40874096
40884097 let color ;
40894098 try {
@@ -4273,7 +4282,8 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {
42734282 }
42744283
42754284 on_sound_settings ( ) {
4276- spawnCommandLineAsync ( "cinnamon-settings sound" ) ;
4285+ //~ spawnCommandLineAsync("cinnamon-settings sound");
4286+ spawnCommandLine ( "cinnamon-settings sound" ) ;
42774287 }
42784288
42794289 on_button_radios_save_clicked ( ) {
@@ -4370,7 +4380,8 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {
43704380 on_button_radios_open_folder_clicked ( ) {
43714381 let appOpeningFolders = app_info_get_default_for_type ( 'inode/directory' , false ) . get_executable ( ) ; // usually returns: nemo
43724382 let command = `%s "%s"` . format ( appOpeningFolders , RADIO_LISTS_DIR ) ;
4373- spawnCommandLineAsync ( command ) ;
4383+ //~ spawnCommandLineAsync(command);
4384+ spawnCommandLine ( command ) ;
43744385 }
43754386
43764387 async on_button_radios_update_clicked ( ) {
@@ -4757,7 +4768,7 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {
47574768 _ ( "Please check this record." ) + "\n" + errors . join ( "\n" ) ,
47584769 [ _ ( "Open the recordings folder" ) ,
47594770 "callback" ,
4760- ( ) => { spawnCommandLineAsync ( ` bash -c 'xdg-open "%s"'`. format ( RADIO30_MUSIC_DIR ) ) }
4771+ ( ) => { spawnCommandLine ( `/usr/bin/env bash -c 'xdg-open "%s"'`. format ( RADIO30_MUSIC_DIR ) ) }
47614772 ]
47624773 ) ;
47634774 } else if ( exitCode !== 0 ) {
@@ -4766,7 +4777,7 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {
47664777 _ ( "Please check this record." ) + "\nExitCode: " + exitCode ,
47674778 [ _ ( "Open the recordings folder" ) ,
47684779 "callback" ,
4769- ( ) => { spawnCommandLineAsync ( ` bash -c 'xdg-open "%s"'`. format ( RADIO30_MUSIC_DIR ) ) }
4780+ ( ) => { spawnCommandLine ( `/usr/bin/env bash -c 'xdg-open "%s"'`. format ( RADIO30_MUSIC_DIR ) ) }
47704781 ]
47714782 ) ;
47724783 } else if ( out == null ) {
@@ -4775,7 +4786,7 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {
47754786 _ ( "Please check this record." ) + "\nOutput is null!" ,
47764787 [ _ ( "Open the recordings folder" ) ,
47774788 "callback" ,
4778- ( ) => { spawnCommandLineAsync ( ` bash -c 'xdg-open "%s"'`. format ( RADIO30_MUSIC_DIR ) ) }
4789+ ( ) => { spawnCommandLine ( `/usr/bin/env bash -c 'xdg-open "%s"'`. format ( RADIO30_MUSIC_DIR ) ) }
47794790 ]
47804791 ) ;
47814792 }
@@ -4882,7 +4893,8 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {
48824893 ( stdout , stderr , exitCode ) => {
48834894 if ( exitCode === 0 ) {
48844895 if ( stdout . startsWith ( "opt1" ) ) {
4885- spawnCommandLineAsync ( "cinnamon-settings extensions -t download" ) ;
4896+ //~ spawnCommandLineAsync("cinnamon-settings extensions -t download");
4897+ spawnCommandLine ( "cinnamon-settings extensions -t download" ) ;
48864898 } else {
48874899 this . OSDhorizontal = false ;
48884900 }
@@ -4919,7 +4931,8 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {
49194931 }
49204932
49214933 on_button_YT_open_dir ( ) {
4922- spawnCommandLineAsync ( `bash -c 'xdg-open "%s/%s"'` . format (
4934+ //~ spawnCommandLineAsync(`bash -c 'xdg-open "%s/%s"'`.format(
4935+ spawnCommandLine ( `/usr/bin/env bash -c 'xdg-open "%s/%s"'` . format (
49234936 RADIO30_MUSIC_DIR ,
49244937 this . settings . getValue ( "recordings-subdirectory" )
49254938 ) )
@@ -5360,7 +5373,8 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {
53605373 }
53615374
53625375 open_rec_folder ( ) {
5363- spawnCommandLineAsync ( app_info_get_default_for_type ( 'inode/directory' , false ) . get_executable ( ) + " " + this . rec_folder ) ;
5376+ //~ spawnCommandLineAsync(app_info_get_default_for_type('inode/directory', false).get_executable() + " " + this.rec_folder);
5377+ spawnCommandLine ( app_info_get_default_for_type ( 'inode/directory' , false ) . get_executable ( ) + " " + this . rec_folder ) ;
53645378 }
53655379
53665380 _onStreamAdded ( control , id ) {
@@ -5598,7 +5612,8 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {
55985612 }
55995613
56005614 openManual ( ) {
5601- spawnCommandLineAsync ( 'xdg-open "%s"' . format ( MANUAL_HTML ) )
5615+ //~ spawnCommandLineAsync('xdg-open "%s"'.format(MANUAL_HTML))
5616+ spawnCommandLine ( 'xdg-open "%s"' . format ( MANUAL_HTML ) )
56025617 }
56035618
56045619 configureApplet ( tab = 0 ) {
@@ -5809,7 +5824,8 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {
58095824 }
58105825
58115826 on_button_import_shoutcast_clicked ( ) {
5812- spawnCommandLineAsync ( "xdg-open https://directory.shoutcast.com/" )
5827+ //~ spawnCommandLineAsync("xdg-open https://directory.shoutcast.com/")
5828+ spawnCommandLine ( "xdg-open https://directory.shoutcast.com/" )
58135829 }
58145830
58155831 on_button_import_file_clicked ( ) {
@@ -6267,7 +6283,8 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {
62676283 // Behavior:
62686284
62696285 on_desklet_open_settings_button_clicked ( ) {
6270- spawnCommandLineAsync ( "cinnamon-settings desklets " + DESKLET_UUID ) ;
6286+ //~ spawnCommandLineAsync("cinnamon-settings desklets "+DESKLET_UUID);
6287+ spawnCommandLine ( "cinnamon-settings desklets " + DESKLET_UUID ) ;
62716288 }
62726289
62736290 _is_desklet_activated ( ) {
0 commit comments