Ignore romaji versions of tags
This commit is contained in:
parent
a448dd9b6e
commit
b71cbd039d
|
@ -81,9 +81,6 @@ void from_json(const nlohmann::json& j, User& user) {
|
|||
|
||||
void from_json(const nlohmann::json& j, Tag& tag) {
|
||||
j.at("tag").get_to(tag.japanese);
|
||||
if (j.contains("romaji")) {
|
||||
tag.romaji = j["romaji"].get<std::string>();
|
||||
}
|
||||
if (j.contains("translation")) {
|
||||
tag.english = j["translation"].get<std::string>();
|
||||
}
|
||||
|
|
|
@ -27,7 +27,6 @@ struct User {
|
|||
|
||||
struct Tag {
|
||||
std::string japanese;
|
||||
std::optional<std::string> romaji;
|
||||
std::optional<std::string> english;
|
||||
};
|
||||
|
||||
|
|
|
@ -171,7 +171,6 @@ static inline Element generate_illust_tags(const Illust& illust) {
|
|||
for (const Tag& i : illust.tags) {
|
||||
std::string tag = [&]() {
|
||||
if (i.english) return *i.english;
|
||||
if (i.romaji) return *i.romaji;
|
||||
return i.japanese;
|
||||
}();
|
||||
|
||||
|
|
Loading…
Reference in New Issue