| 153 | } |
| 154 | |
| 155 | void LabelModel::removeTag(const QString &animeName, const QString &tag, TagNode::TagType type) |
| 156 | { |
| 157 | if(type == TagNode::TAG_ROOT_CATE || !root) return; |
| 158 | TagNode * const cateNode[] = { |
| 159 | root->subNodes->value(C_SCRIPT), |
| 160 | root->subNodes->value(C_TIME), |
| 161 | root->subNodes->value(C_FILE), |
| 162 | root->subNodes->value(C_CUSTOM), |
| 163 | }; |
| 164 | if(type == TagNode::TAG_FILE) |
| 165 | { |
| 166 | if(epPathAnimes.contains(tag) && epPathAnimes[tag].contains(animeName)) |
| 167 | { |
| 168 | epPathAnimes[tag].remove(animeName); |
| 169 | } |
| 170 | else return; |
| 171 | } |
| 172 | |
| 173 | if(type == TagNode::TAG_CUSTOM) |
| 174 | { |
| 175 | if(tagAnimes.contains(tag) && tagAnimes[tag].contains(animeName)) |
| 176 | { |
| 177 | tagAnimes[tag].remove(animeName); |
| 178 | AnimeWorker::instance()->deleteTag(tag, animeName); |
| 179 | } |
| 180 | else return; |
| 181 | } |
| 182 | removeNodeIndex(cateNode[type], tag, false, type==TagNode::TAG_TIME?'-':'/'); |
| 183 | } |
| 184 | |
| 185 | void LabelModel::removeTag(const QString &animeName, const QString &airDate, const QString &scriptId) |
| 186 | { |
nothing calls this directly
no test coverage detected