https://bugs.kde.org/show_bug.cgi?id=523601

--- Comment #2 from [email protected] ---
Thank you for your prompt consideration in this matter.  I'll check out that
dev snapshot and report back.
Yes, I immediately noticed the terminal `.` which brings up the question:
If the tag is e.g., `T.E.S.T.T.A.G.`, does one use `T.E.S.T.T.A.G..`?

I also want to share what Claude came up with as another workaround in the
event that someone else finds this down the road...  This is less preferable in
what I'm trying to do to sanitize tags than the normal work flow, but maybe
someone will find it useful: 

> This is very promising — kid3 ships a real scripting engine (execute @qml), 
> and I can see the exact API used internally. Let me check whether there's a 
> row-based delete that completely avoids the string-name parser.

So to remove tags looping through a directory:

```
for i in *.mp3; do
  kid3-cli -c "execute @qml /cache/remove_frame.qml '$i'" "$i"
done
```

```
import Kid3 1.1

Kid3Script {
  onRun: {
    var target = "T.E.S.T.T.A.G"

    function doWork() {
      var model = app.tag(Frame.Tag_2).frameModel
      var found = -1
      for (var i = 0; i < model.rowCount(); ++i) {
        if (script.getRoleData(model, i, "name") === target) {
          found = i
          break
        }
      }
      if (found !== -1) {
        app.tag(Frame.Tag_2).frameList.selectByRow(found)
        app.tag(Frame.Tag_2).deleteFrame()
        console.log("Removed '" + target + "' from " +
app.selectionInfo.filePath)
      } else {
        console.log("Not found: '" + target + "' in " +
app.selectionInfo.filePath)
      }

      if (!nextFile()) {
        app.saveDirectory()
        Qt.quit()
      } else {
        setTimeout(doWork, 1)
      }
    }

    initFiles(getArguments())
    firstFile()
    doWork()
  }
}
```

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to