App\Console\Commands\SyncMedia::syncAll PHP Method

syncAll() protected method

Sync all files in the configured media path.
protected syncAll ( )
    protected function syncAll()
    {
        $this->info('Koel syncing started.' . PHP_EOL);
        // Get the tags to sync.
        // Notice that this is only meaningful for existing records.
        // New records will have every applicable field sync'ed in.
        $tags = $this->option('tags') ? explode(',', $this->option('tags')) : [];
        Media::sync(null, $tags, $this->option('force'), $this);
        $this->output->writeln(PHP_EOL . PHP_EOL . "<info>Completed! {$this->synced} new or updated song(s)</info>, " . "{$this->ignored} unchanged song(s), " . "and <comment>{$this->invalid} invalid file(s)</comment>.");
    }