Use rename when downloading

This commit is contained in:
Alex Ling
2020-05-17 06:29:13 +00:00
parent 7233e6e5c3
commit d416dc6618
2 changed files with 8 additions and 8 deletions
+5 -7
View File
@@ -1,6 +1,7 @@
require "http/client"
require "json"
require "csv"
require "../rename"
macro string_properties(names)
{% for name in names %}
@@ -72,13 +73,10 @@ module MangaDex
gname = obj["group_name#{s}"].as_s
@groups << {gid, gname}
end
@full_title = @title
unless @chapter.empty?
@full_title = "Ch.#{@chapter} " + @full_title
end
unless @volume.empty?
@full_title = "Vol.#{@volume} " + @full_title
end
rename_rule = Rename::Rule.new \
Config.current.mangadex["chapter_rename_rule"].to_s
@full_title = rename rename_rule
rescue e
raise "failed to parse json: #{e}"
end