Replace String 1.0
Moderators: jiri, drakinite, Addon Administrators
-
- Posts: 33
- Joined: Sun Feb 28, 2021 6:57 am
Replace String 1.0
Can someone tell me HOW the Replace String 1.0 plugin works
OR if it really doesn't work with 5.0.2 (I see, only 5.0.0 and 5.0.1 is listed, but for 5.0.2 is a minor update, so I guessed, it would work).
I give the "existing" String (eg. Tiësto) and the "new" string (eg. Tiesto) - it says, it replaces 123 files - but nothing happens...?
OR if it really doesn't work with 5.0.2 (I see, only 5.0.0 and 5.0.1 is listed, but for 5.0.2 is a minor update, so I guessed, it would work).
I give the "existing" String (eg. Tiësto) and the "new" string (eg. Tiesto) - it says, it replaces 123 files - but nothing happens...?
Re: Replace String 1.0
Hi,
Frank contacted me privately and this is what he found:
Installed the 5.0.1.2433 in English language.
After that, the add-on worked fine!
Then he re-installed the most recent beta 5.0.2.2519 - and it works fine too.
What I noticed: Within the installation of 5.0.2.2519 it asked me to install a new language plugin for German. So maybe THIS was the reason?
Fact is: The issue is caused by language and NOT by 5.0.2 obviously!
So now it runs fine for me and I love Your tool already.
Frank contacted me privately and this is what he found:
Installed the 5.0.1.2433 in English language.
After that, the add-on worked fine!
Then he re-installed the most recent beta 5.0.2.2519 - and it works fine too.
What I noticed: Within the installation of 5.0.2.2519 it asked me to install a new language plugin for German. So maybe THIS was the reason?
Fact is: The issue is caused by language and NOT by 5.0.2 obviously!
So now it runs fine for me and I love Your tool already.
TIA
MPG
Triumph - Hold On: Music holds the secret, to know it can make you whole.
MPG
Triumph - Hold On: Music holds the secret, to know it can make you whole.
replace string
using replace string...
The addon only replaces the first instance of a string, it does not do all the instances in the string
ie "Destination Field:" Artist - replacing , with ;
1) untouched
NEIKED, Mae Muller, POLO G
2) first run
NEIKED; Mae Muller, POLO G
3) second run
NEIKED; Mae Muller; POLO G
Therefor it does not replace , with ; .......
The addon only replaces the first instance of a string, it does not do all the instances in the string
ie "Destination Field:" Artist - replacing , with ;
1) untouched
NEIKED, Mae Muller, POLO G
2) first run
NEIKED; Mae Muller, POLO G
3) second run
NEIKED; Mae Muller; POLO G
Therefor it does not replace , with ; .......
-
- Posts: 1190
- Joined: Tue Jun 13, 2017 8:47 am
- Location: Vienna
Re: Replace String 1.0
@MPG
corrected code: successfully tested several times replaceAll
corrected code: successfully tested several times replaceAll
Last edited by Erwin Hanzl on Thu Dec 09, 2021 5:00 am, edited 1 time in total.
MMW 4.1.31.1919 Gold-Standardinstallation
Re: Replace String 1.0
Thank you for the suggestion. I'll make the change and post an update!
TIA
MPG
Triumph - Hold On: Music holds the secret, to know it can make you whole.
MPG
Triumph - Hold On: Music holds the secret, to know it can make you whole.
Re: Replace String 1.0
New version has been uploaded which now does a replacement of all instances of the search string.
TIA
MPG
Triumph - Hold On: Music holds the secret, to know it can make you whole.
MPG
Triumph - Hold On: Music holds the secret, to know it can make you whole.
-
- Posts: 1190
- Joined: Tue Jun 13, 2017 8:47 am
- Location: Vienna
Re: Replace String 1.0
@MPG
Thanks for your effort.
However, the update is not yet available.
Thanks for your effort.
However, the update is not yet available.
MMW 4.1.31.1919 Gold-Standardinstallation
Re: Replace String 1.0
Likely needs to be reviewed and approved by the MM developers before being available.
TIA
MPG
Triumph - Hold On: Music holds the secret, to know it can make you whole.
MPG
Triumph - Hold On: Music holds the secret, to know it can make you whole.
Re: Replace String 1.0
Hi,
all addons approved.
all addons approved.
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
How to attach PICTURE/SCREENSHOTS to forum posts
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
How to attach PICTURE/SCREENSHOTS to forum posts
-
- Posts: 1190
- Joined: Tue Jun 13, 2017 8:47 am
- Location: Vienna
Re: Replace String 1.0
@MPG
Sorry, but version Replacestring 1.1. does not work.
(Yes, I changed the language to "English" beforehand)
NO ENTRY: context menu
NO ENTRY: Tools menu> Edit tags
I have rewritten the code in the version Replacestring1.0. in file: dlgReplaceString.js
OLD: str.replace
NEW: str.replaceAll
AND IT WORKS IN MM5.0.2.2524 AND 2526
P.S .: You should also rework the window.
thanks
Sorry, but version Replacestring 1.1. does not work.
(Yes, I changed the language to "English" beforehand)
NO ENTRY: context menu
NO ENTRY: Tools menu> Edit tags
I have rewritten the code in the version Replacestring1.0. in file: dlgReplaceString.js
OLD: str.replace
NEW: str.replaceAll
AND IT WORKS IN MM5.0.2.2524 AND 2526
P.S .: You should also rework the window.
thanks
MMW 4.1.31.1919 Gold-Standardinstallation
Re: Replace String 1.0
I have posted a new version, 1.1.1 that will fix the context menu issue and will allow users to resize the form in case the drop down is cut off. It'll be available once approved by the MM5 add-on team.
TIA
MPG
Triumph - Hold On: Music holds the secret, to know it can make you whole.
MPG
Triumph - Hold On: Music holds the secret, to know it can make you whole.
Re: Replace String 1.0
Approved.
I would still recommend the following change to fix the UI glitch:
Change the dropdown's parent's class from "noWrap" to "flex row" (like the others below it), remove the dropdown's style and replace it with the "fill" class. It will then change size according to the window size.
I would still recommend the following change to fix the UI glitch:
Change the dropdown's parent's class from "noWrap" to "flex row" (like the others below it), remove the dropdown's style and replace it with the "fill" class. It will then change size according to the window size.
Student electrical-computer engineer, web programmer, part-time MediaMonkey developer, full-time MediaMonkey enthusiast
I uploaded many addons to MM's addon page, but not all of those were created by me. "By drakinite, Submitted by drakinite" means I made it on my own time. "By Ventis Media, Inc., Submitted by drakinite" means it may have been made by me or another MediaMonkey developer, so instead of crediting/thanking me, please thank the team. You can still ask me for support on any of our addons.
-
- Posts: 1190
- Joined: Tue Jun 13, 2017 8:47 am
- Location: Vienna
Re: Replace String 1.0
@MPG
Please change the following code in Version "Replace String 1.1.1"
OLD: str.replace(edtSearchStr, edtReplaceStr);
NEW: str.replaceAll(edtSearchStr, edtReplaceStr);
Otherwise ONLY the first character in the string is changed.
Thank you.
Thanks for the corrected window.
Please change the following code in Version "Replace String 1.1.1"
OLD: str.replace(edtSearchStr, edtReplaceStr);
NEW: str.replaceAll(edtSearchStr, edtReplaceStr);
Otherwise ONLY the first character in the string is changed.
Thank you.
Code: Select all
switch(ddDestination){
case "All":
objTrackList.forEach(function (itmRec) {
let str = itmRec.title;
itmRec.title = str.replaceAll(edtSearchStr, edtReplaceStr);
str = itmRec.artist;
itmRec.artist = str.replaceAll(edtSearchStr, edtReplaceStr);
str = itmRec.album;
itmRec.album = str.replaceAll(edtSearchStr, edtReplaceStr);
str = itmRec.albumArtist;
itmRec.albumArtist = str.replaceAll(edtSearchStr, edtReplaceStr);
});
break;
case "Title":
objTrackList.forEach(function (itmRec) {
let str = itmRec.title;
itmRec.title = str.replaceAll(edtSearchStr, edtReplaceStr);
});
break;
case "Artist":
objTrackList.forEach(function (itmRec) {
let str = itmRec.artist;
itmRec.artist = str.replaceAll(edtSearchStr, edtReplaceStr);
});
break;
case "Album":
objTrackList.forEach(function (itmRec) {
let str = itmRec.album;
itmRec.album = str.replaceAll(edtSearchStr, edtReplaceStr);
});
break;
case "Album Artist":
objTrackList.forEach(function (itmRec) {
let str = itmRec.albumArtist;
itmRec.albumArtist = str.replaceAll(edtSearchStr, edtReplaceStr);
});
break;
}
Thanks for the corrected window.
MMW 4.1.31.1919 Gold-Standardinstallation
Re: Replace String 1.0
Okay, not sure what happened, but the replaceAll was missed on some of the updates. That is now fixed. Also changed the window style again to be a bit more flexible on the dropdown. Be sure to download version 1.1.2 for the latest updates. Thank again everyone for your suggestions. Glad to see that you are finding it useful.
TIA
MPG
Triumph - Hold On: Music holds the secret, to know it can make you whole.
MPG
Triumph - Hold On: Music holds the secret, to know it can make you whole.
Re: Replace String 1.0
Thank you for developing addons for MM5 and sharing them!
Student electrical-computer engineer, web programmer, part-time MediaMonkey developer, full-time MediaMonkey enthusiast
I uploaded many addons to MM's addon page, but not all of those were created by me. "By drakinite, Submitted by drakinite" means I made it on my own time. "By Ventis Media, Inc., Submitted by drakinite" means it may have been made by me or another MediaMonkey developer, so instead of crediting/thanking me, please thank the team. You can still ask me for support on any of our addons.