lib/command/update.rb in narou-1.5.9 vs lib/command/update.rb in narou-1.5.10

- old
+ new

@@ -28,10 +28,13 @@ Options: EOS @opt.on("-n", "--no-convert", "変換をせずアップデートのみ実行する") { @options["no-convert"] = true } + @opt.on("-a", "--convert-only-new-arrival", "新着のみ変換を実行する") { + @options["convert-only-new-arrival"] = true + } end def execute(argv) super update_target_list = argv.dup @@ -57,13 +60,14 @@ Helper.print_horizontal_rule if i > 0 if display_message puts display_message next end - update_status = Downloader.start(target) - case update_status + result = Downloader.start(target) + case result.status when :ok - unless @options["no-convert"] + unless @options["no-convert"] or + (@options["convert-only-new-arrival"] and not result.new_arrivals) convert_argv = [target] convert_argv << "--no-open" if no_open Convert.execute!(convert_argv) end when :failed