script to auto delete based on a custom tag

This forum is for questions / discussions regarding development of addons / tweaks for MediaMonkey for Windows 4.

Moderators: Gurus, Addon Administrators

glrider
Posts: 11
Joined: Sun Jun 19, 2016 2:07 pm

script to auto delete based on a custom tag

Post by glrider »

My sister and I share our music collection but of course there are some songs I have that she doesn't like and some songs that I have that she doesn't like. What I have been doing so far so MM only has the songs that each of us likes is to place the songs in separate directories (ie R for me, K for her, RK for both of us). While this works, it is a bit hoky because an album/cd maybe have its songs divided across 2 or 3 directories. What I would like to do is leave everything their single directories, and then either find someone who has already written a script and is willing to share, or learn to write the scripts myself. I have written scripts and programs in quite a few languages so I do have some experience.

What I would need are two scripts.

the first script would, after I have selected a group of songs. update a custom tag to a value.

the second script would delete all songs from MM, based on the value in a custom tag.
IanRTaylorUK
Posts: 549
Joined: Fri Dec 27, 2019 4:41 pm

Re: script to auto delete based on a custom tag

Post by IanRTaylorUK »

Hi GLRider,

Not certain I would go that route.

I just use Custom field 7 to mark tracks I like and Custom field 9 for my wife. You can then put - for example - device indications in these fields e.g. "For Car"; "For Phone"; "For Tablet".

Then create a "Collection" with the criterium "[Custom Field Name] contains "Car" or "Phone" or "Tablet"

Finally, use the "Collection" you created in the Device Profile for synchronisation.

Since this approach is independent of the disk / folder location, you can then set your Tools / Options / Library / Auto-Organise to "place" your library (or collection) in a single folder structure e.g. <Type>\<Album Artist>\<Album>\<Title>

One issue that remain is that if you and your sister "rate" the music then one might overwrite the other's rating if you don't turn off the "Auto-Sync file metadata from the device to the PC". Actually this is also an issue with multiple devices!! I just have ONE device with this turned on.

Hope this helps.
Ian Taylor
glrider
Posts: 11
Joined: Sun Jun 19, 2016 2:07 pm

Re: script to auto delete based on a custom tag

Post by glrider »

Hi Ian,

Thanks for the reply. I am fairly new to MM as far as features are concerned. I actually found a couple of new things even yesterday. Mostly I have just used it as a player so far, but have got my sister using it. I checked out collections and see that you need to have MM Gold for that. I will have to consider if I want to go that route. If I do I have a question.

You mentioned about putting "for car", "for tablet", etc in the custom field. I got lost how that identifies which songs you like and which ones your wife likes.
glrider
Posts: 11
Joined: Sun Jun 19, 2016 2:07 pm

Re: script to auto delete based on a custom tag

Post by glrider »

Made headway today. Based on a script I was already using that I got online called CreateUnique.vbs, I was able to use them as a sample and modify them to be able to chose a group of songs and update them to R, K, or RK from the context menu.
IanRTaylorUK
Posts: 549
Joined: Fri Dec 27, 2019 4:41 pm

Re: script to auto delete based on a custom tag

Post by IanRTaylorUK »

glrider wrote: Sat Jan 27, 2024 3:26 pm Hi Ian,

You mentioned about putting "for car", "for tablet", etc in the custom field. I got lost how that identifies which songs you like and which ones your wife likes.
Hi GLRider,

For my wife's selection, we used the Music node with everything sorted by Album Artist then Album then Disc# and finally Track#. Typically she would select an entire album and then Edit Properties and paste the required text into her Custom field.

My selection was similar but I also looked at "Rating" and "Played #".

My wife's car does not have an Android device and uses a pen drive. So, using "her" collection we just selected All tracks and "Organise" or "Convert". In the case of "Convert", we used "Convert file to new destination" with the appropriate format / compression etc.

Note the keyboard short-cuts Ctrl+A ; Ctrl+Shift+C; Ctrl+S
Ian Taylor
Post Reply