RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 3.6 w/ 101 presets (2009-07-02)[MM2+3]

Post by ZvezdanD »

beg wrote:how can I configure the icons placed next to the search field? Especially to get rid of the big tabs "increment play" and "decrement play".
I answered to this question several times and I'll add it to the FAQ section of the first post, but I doubt that anybody read even that.
http://www.mediamonkey.com/forum/viewto ... 41#p184241
http://www.mediamonkey.com/forum/viewto ... 51#p184251

Two main toolbar buttons (Find & Replace and RegExp Presets) currently cannot be removed, but they would be configurable in the next version.
beg wrote:I do need the search box, but in the MM configuration of the search menu there are no actions from regexp find & replace. So I wonder how to configure that?
Options of this script are on the General / RegExp Find and Replace tab of the Options dialog box.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
beg
Posts: 193
Joined: Wed Feb 04, 2009 12:36 pm

Re: RegExp Find & Replace 3.6 w/ 101 presets (2009-07-02)[MM2+3]

Post by beg »

sorry for the question then - and thx for the answer!
Settings for?

Re: RegExp Find & Replace 3.6 w/ 101 presets (2009-07-02)[MM2+3]

Post by Settings for? »

I would like to replace a couple of different phrases in both the tag and in the filename. I can get MM to construct filenames from tag information, so this is no problem.

1. Replace the open & close parenthesis with open & close brackets, i.e., "(" -> "[" ... and ")" -> "]".
2. Replace "DISC 1" with "CD 01," i.e., "[DISC 1]" -> "[CD 01]"
3. Replace the word "and" with the ampersand, i.e., "Tommy James and The Shondells" -> "Tommy James & The Shondells"

There simply is no consistency when using Gracenote. :(

Thanks!
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 3.6 w/ 101 presets (2009-07-02)[MM2+3]

Post by ZvezdanD »

Settings for? wrote:1. Replace the open & close parenthesis with open & close brackets, i.e., "(" -> "[" ... and ")" -> "]".
Find what:

Code: Select all

\(([^)]*)\)
RegExp 1: checked
Replace with:

Code: Select all

[$1]
Settings for? wrote:2. Replace "DISC 1" with "CD 01," i.e., "[DISC 1]" -> "[CD 01]"
Find what:

Code: Select all

DISC (\d+)
RegExp 1: checked
Replace with:

Code: Select all

"CD " & Right("0$1", 2)
VBScript: checked
Settings for? wrote:3. Replace the word "and" with the ampersand, i.e., "Tommy James and The Shondells" -> "Tommy James & The Shondells"
Well, this is so simple that you even don't need to use Regular expression or VBScript expression.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
beg
Posts: 193
Joined: Wed Feb 04, 2009 12:36 pm

Re: RegExp Find & Replace 3.6 w/ 101 presets (2009-07-02)[MM2+3]

Post by beg »

Hi,

I tried to find sth. for my simple question, but failed.. :(

How can I add a string / a word / sth. at the end of the comment field no matter and without changing whatever is in there already of all songs being in a playlist?

Would be great if sby. could help me with that!

thx a lot,
B
beg
Posts: 193
Joined: Wed Feb 04, 2009 12:36 pm

Re: RegExp Find & Replace 3.6 w/ 101 presets (2009-07-02)[MM2+3]

Post by beg »

Hi,

managed to get what I want more or less. I tried like that:

search for (^.*)
using regexp
replacing with $1 "and my adding"

I think there was a problem if there are CRs in the comment field, and/or a ! in the end of the comment..

it worked for now, but if anybody can provide a better/more stable solution, I'll change it for future use.
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 3.6 w/ 101 presets (2009-07-02)[MM2+3]

Post by ZvezdanD »

beg wrote:How can I add a string / a word / sth. at the end of the comment field no matter and without changing whatever is in there already of all songs being in a playlist?
beg wrote:managed to get what I want more or less.
I think there was a problem if there are CRs in the comment field, and/or a ! in the end of the comment..
Find what:

Code: Select all

^((?:.|\s)*)
You could use your Replace with string, but here is another one if you want to append a new line on the begin of newly added string only if old comment is non-empty:
Replace with:

Code: Select all

IIf(Len("$&") > 0, "$&" & vbNewLine & vbNewLine, "") & "and my adding"
VBScript expression: checked

By the way, it doesn't matter if ! is on the end of comment.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
markeh
Posts: 269
Joined: Fri May 25, 2007 1:30 am

Re: RegExp Find & Replace 3.6 w/ 101 presets (2009-07-02)[MM2+3]

Post by markeh »

Remember Playback Position ??


One of the facilities in iTunes not in MM is to set a track to "Remember Playback Position", meaning to restart where you left off.

On my iPod, this is very useful for audiobooks, long radio recordings, podcasts, etc..

In MM, this can be only done by setting the genre to audiobook. Better than nothing, but I would really like to use more than one genre for this - it would make it easier to find what I'm looking for on my iPod.

Is there some way to use RegExp to set the right bit for the iPod in any genre??

Thanks,



.
RobertSmith
Posts: 157
Joined: Wed Jun 24, 2009 1:05 am
Location: Stockholm, The home of Icebears

Re: RegExp Find & Replace 3.6 w/ 101 presets (2009-07-02)[MM2+3]

Post by RobertSmith »

markeh wrote:In MM, this can be only done by setting the genre to audiobook. Better than nothing, but I would really like to use more than one genre for this - it would make it easier to find what I'm looking for on my iPod.

Is there some way to use RegExp to set the right bit for the iPod in any genre??
hmm I'm a iPod user but not sure if I understand what you mean. iPod can't handle multi genre (like MM) so you must have audiobook as first genre and when check "Use only the first Genre when multi Genre exist" in device profile (sync).
Boys Don't Cry
3.1.0.1256 - M$ Vista Business sp1, DELL laptop, WD USB HDD 1TB (iPhone 3GS 32GB, iPod 30GB, Archos AV500 60GB)
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: RegExp Find & Replace 3.6 w/ 101 presets (2009-07-02)[MM2+3]

Post by nynaevelan »

markeh wrote:


In MM, this can be only done by setting the genre to audiobook. Better than nothing, but I would really like to use more than one genre for this - it would make it easier to find what I'm looking for on my iPod.
If you are a Gold user you can setup your filters to enable bookmarking no matter the file type or genre. I am not sure if it is possible to use bookmarking if you are not a Gold user or if it is possible to enable/disable bookmarking on individual file types other than Audiobooks.

Nyn
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
markeh
Posts: 269
Joined: Fri May 25, 2007 1:30 am

Re: RegExp Find & Replace 3.6 w/ 101 presets (2009-07-02)[MM2+3]

Post by markeh »

hmm I'm a iPod user but not sure if I understand what you mean. iPod can't handle multi genre (like MM) so you must have audiobook as first genre and when check "Use only the first Genre when multi Genre exist" in device profile (sync).
Open iTunes, select any track. Right mouse and select "get info", select the "options" tab. One of the binary choices (on or off) is "remember playback position". (Note that this works with any genre setting).

This means that if you listen to 1/3, or 1/2 of the track on your iPod, turn off your iPod, or select a different track, when you select and play this track again the iPod will start at the same position you stopped last time. This has many uses, but think of listening to a one hour podcast that is interrupted, and you stop your iPod. When you come back the next hour/day/week, it automatically restarts where it stopped. Very useful. This feature is turned on on the iPod only when you set "audiobook" as your genre in MediaMonkey. And only for this genre, instead of setting a switch that works with any genre.

If you are a Gold user you can setup your filters to enable bookmarking no matter the file type or genre. I am not sure if it is possible to use bookmarking if you are not a Gold user or if it is possible to enable/disable bookmarking on individual file types other than Audiobooks.
Well, I am a gold user, but I'm not sure if this is relevant. I'm not asking about restarting when playing a track using the MediaMonkey player. I'm asking about playback on my iPod (as above).

If bookmarking can effect playback on my iPod, I live to learn - please let me know.

So... what I'm really looking for is a way to use RegExp to set the same bit that "remember playback position" does with iTunes.

thanks,



.
RobertSmith
Posts: 157
Joined: Wed Jun 24, 2009 1:05 am
Location: Stockholm, The home of Icebears

Re: RegExp Find & Replace 3.6 w/ 101 presets (2009-07-02)[MM2+3]

Post by RobertSmith »

markeh wrote:Open iTunes, select any track. Right mouse and select "get info", select the "options" tab. One of the binary choices (on or off) is "remember playback position". (Note that this works with any genre setting).
OK, now I understand what u mean :)
Sry to say but I'm 100% sure that this can't be fixed with any MM script. This is a specific iTunes/iPod solution similar to the odd way how iPod handle compilations using an extended tags (ITUNESCOMPILATION). MM (incl. this script) can only modify standard tags plus extended tags added by MM like CustomX. I'm using Sharepod to fix the compilations problem. There could be work around for this problem, here is one site from google.

The script author is not a iPod user so to avoid getting O.T. please use this topic Unofficial but very helpful iPod/iTunes/MediaMonkey Hints
Boys Don't Cry
3.1.0.1256 - M$ Vista Business sp1, DELL laptop, WD USB HDD 1TB (iPhone 3GS 32GB, iPod 30GB, Archos AV500 60GB)
beg
Posts: 193
Joined: Wed Feb 04, 2009 12:36 pm

Re: RegExp Find & Replace 3.6 w/ 101 presets (2009-07-02)[MM2+3]

Post by beg »

Hi,

it's a bit off topic also, but recently I got that strange behaviour of MM:

When I skip through a playlist listening to the titles in there (to sort them out and/or rearrange) MM remembers each position where I left the song and when I get back it continues where I stopped listening. (no matter if I pause, stop, or just skip to another song)

It would be nice to be able to do that on purpose, but my MM is doing that now for EVERY song. And I dont know how to get rid of that bug/feature again?!

Any ideas?
Alterx
Posts: 21
Joined: Fri Jul 03, 2009 2:12 pm

Re: RegExp Find & Replace 3.6 w/ 101 presets (2009-07-02)[MM2+3]

Post by Alterx »

Hello.

I' d like to add a custom preset to manage one of the custom field but i can't figure out how i can do it so any help will be appreciated :)

This is the situation:

I have a quite large collection of songs (more then 100gb) and i have organized it to use "Surname, Name" in Artist field. I see that for some scripts using Last.fm this is a problem due some limitation when querying this site.

That's how i want to use a custom preset:

i'd like to Replace one custom field (let's say "Alternative Sort" field) with current value from "Artist" field and i want to swap "Surname, Name" to "Name Surname" (removing ",") but only if there is a "," in the source field (i hope i can limit problematic situation with group names like "Pink Floyd" that, of course, i dont' want to swap)

Of course i can do it partially using a combination of the default presets and choosing manually if i need to run them but i'd like to use only 1 preset to avoid errors.

Any suggestion how can handle this need with only 1 preset and using "if" statements?

Thank you very much for your answers.

Ciao

Andrea
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegExp Find & Replace 3.6 w/ 101 presets (2009-07-02)[MM2+3]

Post by ZvezdanD »

Alterx wrote:i'd like to Replace one custom field (let's say "Alternative Sort" field) with current value from "Artist" field and i want to swap "Surname, Name" to "Name Surname" (removing ",") but only if there is a "," in the source field
You want to modify two fields in same time using one preset which is not currently possible. However, you could get what you want using two existing presets:
1. Copy the Date when the file is last modified to the Date added field - just change fields with Into and From dropdown lists;
2. Swap the last and the first name of the Artist with removed ", ".
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
Post Reply