lib/command/list.rb in narou-1.5.5.1 vs lib/command/list.rb in narou-1.5.6
- old
+ new
@@ -66,10 +66,11 @@
end
id = novel["id"]
frozen = Narou.novel_frozen?(id)
disp_id = ((frozen ? "*" : "") + id.to_s).rjust(4)
disp_id = disp_id.sub("*", "<cyan>*</cyan>").termcolor if frozen
+ flags = novel["flags"] || {}
puts [
disp_id,
novel["last_update"].strftime("%y/%m/%d").tap { |s|
if novel["new_arrivals_date"] && novel["new_arrivals_date"] + NEW_ARRIVALS_LIMIT >= now
# 新着表示色
@@ -80,10 +81,11 @@
end
},
@options["type"] ? NOVEL_TYPE_LABEL[novel_type] : nil,
novel["title"] + (!@options["type"] && novel_type == 2 ?
" <gray>(#{NOVEL_TYPE_LABEL[novel_type]})</gray>".termcolor :
- ""),
+ "") +
+ (flags["end"] ? " <gray>(完結)</gray>".termcolor : ""),
@options["url"] ? novel["toc_url"] : nil
].compact.join(" | ")
end
end