I’ll do some investigating. Thanks for letting me know.
Latest version has been uploaded, including some additional fields in the search index.
This probably has it's cause in the greedy first part .* of the regexp ".*"albums":"({.*?})".*". In this form it searches the last appearance of the string"albums". But this string appears only once and near to the beginning of the data, so that means we can search for the first one. For this to appear we should change the first part of the regexp to a lazy .*? one.
If you can edit the file Qobuz.inc yourself, the line 28 of it should read:
RegExpReplace ".*?\"albums\":\"({.*?})\".*" "\[\1\]"
If you can't edit the file yourself please let us know.
Are you using a Mac? Under windows I can't duplicate this issue, and AFAIK the regexp implementations are different between mp3tag for Mac and windows.
@yorickausyps, thanks for the suggestion. That worked for me, anyway.
@aspnxl, the newest version is available in the first post.
Although, I can't guarantee this will fix it on Mac. Not sure what the differences are in implementations. @Florian?
Yes I am macOS. I downloaded the latest version but I am still getting the same error. I checked that the line @yorickausyps mentioned in the Qobuz.inc file matched what he suggested.
My next wild guess is that the curly braces need to be quoted by a backslash. The ICU regular expression doks state: Characters that must be quoted to be treated as literals are * ? + [ ( ) { } ^ $ | \ .
That means the line 28 should read:
RegExpReplace ".*?\"albums\":\"(\{.*?\})\".*" "\[\1\]"
Same in line 36
RegExpReplace "\"(.*?)\"\:(\{\"id\"\:\"\1\",)" "\2"
I hope this helps.
Here is a fixed version that should also work on macOS. The main issue was using \1 instead of $1 in the replacement string. While \1 is the standard syntax for backreferences in regex patterns, replacement syntax varies between regex flavors, and many engines expect $1 instead.
Qobuz.inc.zip (3.0 KB)
For your reference, here are the relevant parts from the ICU Documentation:
| Character | Description |
|---|---|
\n |
Back Reference. Match whatever the nth capturing group matched. n must be a number > 1 and < total number of capture groups in the pattern. |
And in Find and Replace:
| Character | Descriptions |
|---|---|
$n |
The text of capture group ‘n’ will be substituted for $n. n must be >= 0 and not greater than the number of capture groups. An unescaped $ in replacement text that is not followed by a capture group specification, either a number or name, is an error. |
\ |
Treat the following character as a literal, suppressing any special meaning. Backslash escaping in substitution text is only required for $ and \, but may be used on any other character without bad effects. |
Awesome. Thanks for helping out @Florian @GMK @yorickausyps ! ![]()
