Ok first, I'm very new at this and just starting to use MM.
I've setup a very basic script to convert my flac file ratings to the 0-100 rating system MM uses. I use another app that uses 1-5 for ratings and allow someone else on the network access to my files that uses a program that also uses 1-5. So what I want is to leave the 1-5 rating in the flac tag. MM is set to not make any changes to the actual tags. I have MM set to monitor my music folder so it updates any time any file changes. I may update a rating through another program that changes the actual tag and would like MM to reflect that rating. Basically my script just takes the current rating 0-5 and multiplies it by 20 then updates MM DB to show the correct rating.
So I guess my question is, how can I have my script run when MM detects a file has changed. I thought the "OnTrackProperties" would work but that seems to only work if the user actually updates the tag manually. I need to run the script on a specific file that the File Monitor detects has changed.
Thanks for any help.
On File Monitor
Moderators: Gurus, Addon Administrators
-
- Posts: 9
- Joined: Mon Mar 22, 2010 11:14 pm
Re: On File Monitor
Well I guess the "OnTrackProperties" is triggered alot more often than I thought, any time the user or any action by a script or MM changes anything. However it doesn't seem to be triggered when you import new tracks or the File Monitor detects a change and updates a track. Is there a way to have a script auto-run on only imported tracks or tracks updated by the File Monitor? I have a script written that will change the rating tag in my flac files to the 0-100 way MM uses but will leave the 0-5 in the actual flac tag to be read by another program I use.
Re: On File Monitor
Well there is an "OnTrackAdded" event for when new tracks are added to the library (which includes file monitor) but I don't think there is an "OnTrackModified" or similar event. Maybe "OnTrackProperties" should also be firing for file monitor, this might be a bug. If not and this is by design then a new event would need to be added.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
-
- Posts: 9
- Joined: Mon Mar 22, 2010 11:14 pm
Re: On File Monitor
OnTrackAdded does indeed trigger with File Monitor on a newly added track but does not if it is an existing file that has only changed. Also verified that OnTrackProperties doesn't trigger with the same conditions. So maybe it is a bug or maybe it was just never implemented. It would be nice to have that work though. I can get around it by just setting up a auto-playlist that includes all tracks with invalid ratings then just have the script run on that playlist. I'm still cleaning up and tweaking the script, it's a pretty basic script but if anyone might be interested in it let me know.
So far I'm fairly impressed with MM and the flexibility you have to work with it and add your own additional functionality. Reason I ran across it though was because of its excellent device sync abilities. I have been using jriver media center for a while, it's a good program but they are lacking in a few areas such as sync'ing and they don't give you the possibility to expand it using scripts on your own.
So far I'm fairly impressed with MM and the flexibility you have to work with it and add your own additional functionality. Reason I ran across it though was because of its excellent device sync abilities. I have been using jriver media center for a while, it's a good program but they are lacking in a few areas such as sync'ing and they don't give you the possibility to expand it using scripts on your own.
Re: On File Monitor
I agree, the program itself is very powerful but it's the scripting capabilities that really make it my number one choice! 

Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.