app/Console/Commands/Sync.php
/**
	 * Execute the console command.
	 *
	 * @return mixed
	 */
Execute the console command.
@return mixed
Execute the console command . @return mixed
public function handle()
	{
		$this->info('Start syncing.');
		$directory = $this->argument('dir');
		$owner_id = (int) $this->option('owner_id'); 
		$album_id = (int) $this->option('album_id'); 
		$resync_metadata = $this->option('resync_metadata');
		$delete_imported = false; 
		$force_skip_duplicates = true;
		$import_controller = new ImportController($this->photoFunctions, $this->albumFunctions, $this->sessionFunctions);
		$import_controller->enableCLIStatus();
		$import_controller->disableMemCheck();
		Session::put('UserID', $owner_id);
		try {
			$import_controller->server_exec($directory, $album_id, $delete_imported, $force_skip_duplicates, null, $resync_metadata);
		} catch (Exception $e) {
			$this->error($e);
		}
		$this->info('Done syncing.');
	}
public function handle ( ) { $ this -> info ( 'Start syncing.' ) ; $ directory = $ this -> argument ( 'dir' ) ; $ owner_id = ( int ) $ this -> option ( 'owner_id' ) ; $ album_id = ( int ) $ this -> option ( 'album_id' ) ; $ resync_metadata = $ this -> option ( 'resync_metadata' ) ; $ delete_imported = false ; $ force_skip_duplicates = true ; $ import_controller = new ImportController ( $ this -> photoFunctions , $ this -> albumFunctions , $ this -> sessionFunctions ) ; $ import_controller -> enableCLIStatus ( ) ; $ import_controller -> disableMemCheck ( ) ; Session :: put ( 'UserID' , $ owner_id ) ; try { $ import_controller -> server_exec ( $ directory , $ album_id , $ delete_imported , $ force_skip_duplicates , null , $ resync_metadata ) ; } catch ( Exception $ e ) { $ this -> error ( $ e ) ; } $ this -> info ( 'Done syncing.' ) ; }
Execute the console command.
Execute the console command .
// in case no ID provided -> import as root user // in case no ID provided -> import to root folder // we want to sync -> do not delete imported files // Enable CLI formatting of status // Disable Memory Check