Updating downloading function

Took 6 minutes
This commit is contained in:
Tobias Hopp 2020-07-07 19:32:26 +02:00
parent e93e3e88a7
commit a41b443d15

View File

@ -32,14 +32,18 @@ function main()
$downloader->requestSong( $cmd[1] ); $downloader->requestSong( $cmd[1] );
} catch ( RuntimeException $e ) } catch ( RuntimeException $e )
{ {
echo "An error occured while processing the download.\n"; echo "An error occurred while processing the download.\n";
echo $e->getMessage() . "\n"; echo $e->getMessage() . "\n";
} }
break; break;
case 'downloadmusic': case 'downloadmusic':
echo "This function has an old CLI! Opening CLI...\n-----------\n"; if( isset( $cmd[1] ) )
{
echo "In this version, passing arguments to this function is not supported. Arguments will be ignored!\n";
}
echo "Loading another CLI...\n-----------\n";
new AudioVideoHandler(); new AudioVideoHandler();
echo "CLI exited. Continue with new CLI...\n"; echo "CLI exited. Continue with main CLI...\n";
break; break;
case 'setsid': case 'setsid':
if( !isset( $cmd[1] ) ) if( !isset( $cmd[1] ) )