ExtractFields v0.1.4 [MM2+3]
quick question, im not knowalgable at all on this stuff, and before i start breaking it, can i use this to, in the properties tab on a track automatically copy the artist field in to the album artist field, therefore replacing the annoying "various" in the album artist field that having compilaton albums causes?
if not anyone know of something that will? i ahve an inordinalte amount of comps, and dont wanna do them all by hand...
if not anyone know of something that will? i ahve an inordinalte amount of comps, and dont wanna do them all by hand...
Yes you can use this script to do that. But it will not do it automatically.
What you can do for your all your current songs, is select them all and apply
If you have the Gold version, you can use the Advanced Find function to find all song where AlbumArtist="Various", and the select them all before running the script.
What you can do for your all your current songs, is select them all and apply
Code: Select all
<Artist> --> <AlbumArtist>
3'rd solution without scripts:
Just make album artist Empty and MM will fill that with Artist if Album fields exists. Also I think that you can navigate Albums/Artist for Various and do tag edit there even in Free MM.Eyal wrote:If you have the Gold version, you can use the Advanced Find function to find all song where AlbumArtist="Various", and the select them all before running the script.
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
Hi...i dunno if any1 else is having problem with this script on MM3....it works perfectly, changes the tags, but when i press close or the X to close it crashes MM...any ideas about what to change in order to make it work?
The error I get says:
MediaMonkey has encountered a problem.
Control '' has no parent window.
And it crashes!
The error I get says:
MediaMonkey has encountered a problem.
Control '' has no parent window.
And it crashes!
Cheers, judas
I just posted a modification to the script I made a while ago. I suppose it was to fix the problem you're describing, but due to holidays and such I must've forgotten. Hopefully it works as supposed, if not please let me know.
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
This question
http://www.mediamonkey.com/forum/viewtopic.php?p=101275
(Partial) Answer:
You can specify the default mask, so the script remembers it everytime:
And this are the masks:
Regarding your other question, I don't know how to trigger the script to run when a file is added to the library...
was asked here:cyclopede wrote:Thank you, it's working quite well !!
Is there a way thou to make it remember the mask and let the script working automatically as soon as a new file is added to the monitored folder ?
Thanks
Julien.
http://www.mediamonkey.com/forum/viewtopic.php?p=101275
(Partial) Answer:
You can specify the default mask, so the script remembers it everytime:
Code: Select all
'*****************************************************
'**** USER DEFAULTS ****
'*****************************************************
Const def_EntryLinesCnt = 2
Const def_TagField = "Title"
Const def_TagMask = "%A - %S"
Code: Select all
%A = ArtistName"
%C = Author"
%G = Genre"
%L = AlbumName"
%M = BPM"
%R = AlbumArtistName"
%S = Title"
%T = TrackOrder"
%U = Custom1"
%V = Custom2"
%W = Custom3"
%Y = Year"
%P = Path"
Cheers, judas
Hey Julien
ExtractFields can do what you want, with some modifications:
- change the script's defaults like Judas explained
- add an event handler for SDB.OnTrackAdded
- change some other code
- make that the dialog is closed automatically
So this is possible, but probably not the best tool for the task.
Solutions:
- Your song's file names contain the info (title, artist, copyright) you need in the tags: change the way MediaMonkey "infers" this info from the filename/path (and make sure that MM always uses this approach when adding files). ==> Add a custom [SongMasks] mask in MM's configuration file.
- The above doesn't apply, you want to get the info (title, artist, copyright) from the existing ID3 tags (not from the filename/path). ==> A small custom script would be much faster and easier to create.
According to your message, the 2nd solution is the way to go. Is that right?
ExtractFields can do what you want, with some modifications:
- change the script's defaults like Judas explained
- add an event handler for SDB.OnTrackAdded
- change some other code
- make that the dialog is closed automatically
So this is possible, but probably not the best tool for the task.
Solutions:
- Your song's file names contain the info (title, artist, copyright) you need in the tags: change the way MediaMonkey "infers" this info from the filename/path (and make sure that MM always uses this approach when adding files). ==> Add a custom [SongMasks] mask in MM's configuration file.
- The above doesn't apply, you want to get the info (title, artist, copyright) from the existing ID3 tags (not from the filename/path). ==> A small custom script would be much faster and easier to create.
According to your message, the 2nd solution is the way to go. Is that right?
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
Try this:
or this:
Both are autoscripts. Put one of them in MediaMonkey's Scripts\Auto folder as explained here.
It might also be possible with regular expressions (but don't ask me that).
Code: Select all
Sub OnStartup
Script.RegisterEvent SDB, "OnTrackAdded", "SDB_OnTrackAdded"
End Sub
Sub SDB_OnTrackAdded(NewTrack)
If InStr(1, NewTrack.Path, "C:/hidownload/LiveBroadcast/", 1) = 0 Then Exit Sub
NewTrack.Title = ""
NewTrack.ArtistName = ""
NewTrack.Custom3 = ""
NewTrack.ParseText(NewTrack.Title, "%S, %A, Copyright:(C) %W")
NewTrack.Copyright = NewTrack.Custom3
NewTrack.Custom3 = ""
NewTrack.UpdateDB
NewTrack.WriteTags
End Sub
Code: Select all
Sub OnStartup
Script.RegisterEvent SDB, "OnTrackAdded", "SDB_OnTrackAdded"
End Sub
Sub SDB_OnTrackAdded(NewTrack)
If InStr(1, NewTrack.Path, "C:/hidownload/LiveBroadcast/", 1) = 0 Then Exit Sub
Dim txt : txt = NewTrack.Title
Dim pos1, pos2
pos1 = InStr(1, txt, ",", 1)
pos2 = InStr(pos1 + 1, txt, ",", 1)
NewTrack.Title = Mid(txt, 1, pos1 - (1))
NewTrack.ArtistName = Mid(txt, pos1 + 1 + 1, pos2 - (pos1 + 1 + 1))
NewTrack.Copyright = Mid(txt, pos2 + 1 + 15)
NewTrack.UpdateDB
NewTrack.WriteTags
End Sub
It might also be possible with regular expressions (but don't ask me that).
Last edited by Steegy on Fri Aug 31, 2007 3:25 am, edited 2 times in total.
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
Thank you Judas and Steegy, I do appreciate your help. The code you gave me is what I'm looking for.
Thou I'm afraid that if I save it in the scripts/auto folder, it's going to rename every files I add in MM, I only want to rename a daily download that I store in a specific folder. Can a line be added to the code to specify this folder ?
Thanks again,
Julien.
Thou I'm afraid that if I save it in the scripts/auto folder, it's going to rename every files I add in MM, I only want to rename a daily download that I store in a specific folder. Can a line be added to the code to specify this folder ?
Thanks again,
Julien.
Yes sure.
Just show how the paths for your normal music, and the paths for your daily downloads, look like (e.g. using an example name). That way, we can see what the difference is and add an extra condition to the script.
Just as a remark: the script will change the tags (title, artist, copyright) from the daily downloads, but not the file name (you can let the script do that too if you want).
Cheers
Steegy
Just show how the paths for your normal music, and the paths for your daily downloads, look like (e.g. using an example name). That way, we can see what the difference is and add an extra condition to the script.
Just as a remark: the script will change the tags (title, artist, copyright) from the daily downloads, but not the file name (you can let the script do that too if you want).
Cheers
Steegy
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
I updated the code above. It will only run if the path starts with "C:/hidownload/LiveBroadcast/" (which, of course, you can change to "C:/hidownload/LiveBroadcast/rmv8.bbc.net.uk/radio1" if you want)
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).