MCPcopy Create free account
hub / github.com/KikoPlayProject/KikoPlay / removeTag

Method removeTag

MediaLibrary/labelmodel.cpp:155–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153}
154
155void 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
185void LabelModel::removeTag(const QString &animeName, const QString &airDate, const QString &scriptId)
186{

Callers

nothing calls this directly

Calls 15

valueMethod · 0.80
deleteTagMethod · 0.80
deleteTagsMethod · 0.80
removeSubNodeMethod · 0.80
containsMethod · 0.45
removeMethod · 0.45
isEmptyMethod · 0.45
getScriptMethod · 0.45
nameMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
isValidMethod · 0.45

Tested by

no test coverage detected