From: Damyan Ivanov Date: Thu, 11 Nov 2021 09:23:28 +0000 (+0000) Subject: added --skip-db-update option X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=f55502115ee1db8fbc9de05bfa6bb2cbfcf82fb3;p=mpd-feeder.git added --skip-db-update option skips initial database update --- diff --git a/bin/mpd-feeder b/bin/mpd-feeder index c6792e8..d2768c6 100755 --- a/bin/mpd-feeder +++ b/bin/mpd-feeder @@ -21,6 +21,7 @@ class Options { has $verbose :reader = 0; has $single :reader = 0; has $one_shot :reader = 0; + has $skip_db_update :reader = 0; has $dump_config :reader = 0; method verb($message) { @@ -38,6 +39,7 @@ class Options { 'dump-config!' => \$dump_config, 's|single!' => \$single, 'one-shot!' => \$one_shot, + 'skip-db-update!' => \$skip_db_update, 'tql|target-queue-length=n' => \$target_queue_length, 'mpd-host=s' => \$mpd_host, 'mpd-port=s' => \$mpd_port, @@ -152,7 +154,7 @@ use constant DEFAULT_CONFIG_FILE => '/etc/mpd-feeder/mpd-feeder.conf'; ); $self->connect_db; - $self->update_db; + $self->update_db unless $self->opt->skip_db_update; } }