Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #1221 #1222

Merged
merged 1 commit into from
Feb 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/Console/Commands/Sync.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ class Sync extends Command
protected $signature =
'lychee:sync ' .
'{dir : directory to sync} ' .
'{--album_id=0 : Album ID to import to} ' .
'{--album_id= : Album ID to import to} ' .
'{--owner_id=0 : Owner ID of imported photos} ' .
'{--resync_metadata : Re-sync metadata of existing files} ' .
'{--delete_imported=%s : Delete the original files} ' .
'{--import_via_symlink=%s : Imports photos from via a symlink instead of copying the files} ' .
'{--skip_duplicates=%s : Don\'t Skip photos and albums if they already exist in the gallery}';
'{--skip_duplicates=%s : Don\'t skip photos and albums if they already exist in the gallery}';

/**
* The console command description.
Expand Down Expand Up @@ -56,7 +56,7 @@ public function handle(Exec $exec)
{
$directory = $this->argument('dir');
$owner_id = (int) $this->option('owner_id'); // in case no ID provided -> import as root user
$album_id = (int) $this->option('album_id'); // in case no ID provided -> import to root folder
$album_id = ((string) $this->option('album_id')) ?: null; // in case no ID provided -> import to root folder

// Enable CLI formatting of status
$exec->statusCLIFormatting = true;
Expand Down