This commit is contained in:
Alex Ling
2021-06-05 10:53:45 +00:00
parent 87c479bf42
commit 59bcb4db3b
7 changed files with 496 additions and 631 deletions
+10 -4
View File
@@ -638,8 +638,8 @@ struct APIRouter
"success" => Bool,
"error" => String?,
"chapters?" => [{
"id" => String,
"title" => String,
"id" => String,
"title?" => String,
}],
"title" => String?,
}
@@ -649,8 +649,14 @@ struct APIRouter
plugin = Plugin.new env.params.query["plugin"].as String
json = plugin.list_chapters query
chapters = json["chapters"]
title = json["title"]
if plugin.info.version == 1
chapters = json["chapters"]
title = json["title"]
else
chapters = json
title = nil
end
send_json env, {
"success" => true,