CleanImport v1.1.0 [MM3+4]

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

Moderators: Peke, Gurus

Steegy
Posts: 3452
Joined: Sat Nov 05, 2005 7:17 pm

CleanImport v1.1.0 [MM3+4]

Post by Steegy »

:: Script CleanImport v1.1.0

When you import new tracks in your library, it can happen that some tags are added that you don't really want. Examples could be the song's Comments, Rating (your taste can be different than someone else's), fields that you don't care about like ISRC, Publisher, ... (of course this is all personal).
This script will automatically clear the specified fields when the tracks are added to the library.


Installation Package: CleanImport110.mmip


Information:

The script runs each time a new track is added in MediaMonkey.

Depending on your previous choice, you'll have to confirm that you want to clear the specified fields:
Image

The settings can be changed in the configuration panel:
Image
(Author being the composer)

The script will only clear the fields in the MediaMonkey library, so it will not change the files' tags (for this you can use MM's "synchronise tags" function). That means that, if you accidentally cleared some fields while importing, you can just import them again and all is well.


Note: If manually clearing a specific field is what you're looking for, then take a look at the Clear Field script.
Last edited by Steegy on Sun Jun 12, 2011 5:41 pm, edited 2 times in total.
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
heartofhate
Posts: 190
Joined: Wed Jun 18, 2008 1:43 pm
Location: berlin

Re: CleanImport v1.0.0 [MM3+4]

Post by heartofhate »

sounds really promissing. i'll try it out later
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: CleanImport v1.0.0 [MM3+4]

Post by nynaevelan »

Nice, although I wish there was a way for it to save the settings without the confirmation each session, but I can live with that. Good job Steegy.
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
Dreadlau
Posts: 1967
Joined: Sun Nov 25, 2007 6:49 am

Re: CleanImport v1.0.0 [MM3+4]

Post by Dreadlau »

Nice idea!

Thank you Steegy.
Seven Ultimate X64 SP1 / Sansa Clip 2go (with RockBox)
Steegy
Posts: 3452
Joined: Sat Nov 05, 2005 7:17 pm

Re: CleanImport v1.0.0 [MM3+4]

Post by Steegy »

nynaevelan wrote:Nice, although I wish there was a way for it to save the settings without the confirmation each session, but I can live with that. Good job Steegy.
Ok, check out he new version.

Cheers,
Steegy
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: CleanImport v1.1.0 [MM3+4]

Post by nynaevelan »

Sheer Perfection, my first official new MM4 script. :D :D
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
Brouwerik
Posts: 70
Joined: Wed May 13, 2009 9:10 am

Re: CleanImport v1.1.0 [MM3+4]

Post by Brouwerik »

Another great script :D

But this script could go godly if there was an option for fields to set "standard" values like a rating of 2,5.

greetz
Image
Kyle Maclean
Posts: 7
Joined: Wed Jun 06, 2012 11:30 pm

Re: CleanImport v1.1.0 [MM3+4]

Post by Kyle Maclean »

How can I use this extension with albums that I already have in my library?
Steegy
Posts: 3452
Joined: Sat Nov 05, 2005 7:17 pm

Re: CleanImport v1.1.0 [MM3+4]

Post by Steegy »

Brouwerik wrote:But this script could go godly if there was an option for fields to set "standard" values like a rating of 2,5.
In ...\MediaMonkey\Scripts\Auto\CleanImport.vbs:

Code: Select all

    Fields = Array("Author", "Band", "Conductor", "InvolvedPeople", "Grouping", "Bookmark", "Genre", "Comment", "Lyrics", "Rating", "RatingString", "Tempo", "Quality", "Occasion", "Mood", "Publisher", "ISRC", "Encoder", "Copyright", "Lyricist", "OriginalLyricist")
    EmptyValues = Array("","","","","","0","","","","-1","","","","","","","","","","","")
If you change the -1 value in the script (EmptyValue corresponding with the Field) to e.g. 50, then cleaning the Rating field would actually set it to 2,5 stars instead of none.
(see here for the rating values that can be used)



Kyle Maclean wrote:How can I use this extension with albums that I already have in my library?
As it is now you can't. MediaMonkey and some other scripts are powerful enough to do this, but maybe not as easy as select and click to get the job done.
For this, the script can be modified.
Add the following to ...\MediaMonkey\Scripts\Auto\CleanImport.vbs:

Code: Select all

Sub CleanSelectedTracks
    AllowCleaning = True
    Dim i
    For i = 0 To SDB.CurrentSongList.Count - 1
        CleanImportedTags SDB.CurrentSongList.Item(i)
    Next
End Sub
Add the following to ...\MediaMonkey\Scripts\Scripts.ini:

Code: Select all

[CleanSelectedTracks]
FileName=Auto\CleanImport.vbs
ProcName=CleanSelectedTracks
Order=1
DisplayName=Clean selected tracks
Description=Resets the chosen fields for the selected tracks
Language=VBScript
ScriptType=0
And (re)start MM. The entry "Clean selected tracks" is now added under menu Tools > Scripts.
If you want, you can set a shortcut key through menu Tools > Options... > General > Shortcut keys (or something like that). There add a new shortcut key for action 'General : Execute Script : Clean selected tracks' down at the bottom (you can also specify a shortcut key in Scripts.in, but that's not the correct way to do it anymore in MM3/4).

Cheers,
Steegy
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
dipe1

Re: CleanImport v1.1.0 [MM3+4]

Post by dipe1 »

Hey is there any chance to add all the missing Tags to this wonderful script?!
Like Album, Songwriter, ... etc.
I tried it myself but failed ;)

Would be a wonderful thing so i dont have to tick hundred of boxes to delete all the tags instead of title & artist.
Steegy
Posts: 3452
Joined: Sat Nov 05, 2005 7:17 pm

Re: CleanImport v1.1.0 [MM3+4]

Post by Steegy »

You can add more fields (see leftmost column in SongData fields) in the Fields array.
But not all of them can be added though, only fields of type String, Long, Date, Boolean, ... (TEXT, REAL, INTEGER, BOOLEAN, DATE).
The database Value Type (TEXT, REAL, ...) can be seen in that table. If you click a field, a new page will open with more information about it, e.g. the field type (String, Long, ...) and possible values.
In the EmptyValues array then you also have to specify the default value you want, like the existing entries in the script.

Field Album can not be used (value type ISDBAlbum). Use AlbumName (value type String) instead.
Same for Artist. Instead of Artist use ArtistName.

Field Songwriter does not exist. Instead, maybe you mean Author, Lyricist, MusicComposer, ...?

Code: Select all

Fields = Array("Author", "Band", "Conductor", "InvolvedPeople", "Grouping", "Bookmark", "Genre", "Comment", "Lyrics", "Rating", "RatingString", "Tempo", "Quality", "Occasion", "Mood", "Publisher", "ISRC", "Encoder", "Copyright", "Lyricist", "OriginalLyricist")
    EmptyValues = Array("","","","","","0","","","","-1","","","","","","","","","","","")
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
richjoh
Posts: 38
Joined: Sat Aug 23, 2008 7:11 am

Re: CleanImport v1.1.0 [MM3+4]

Post by richjoh »

How do I UNinstall this script? What files do I delete?
nohitter151
Posts: 23640
Joined: Wed Aug 09, 2006 10:20 am
Location: NJ, USA
Contact:

Re: CleanImport v1.1.0 [MM3+4]

Post by nohitter151 »

Tools > Extensions

Select the addon and press uninstall.
MediaMonkey user since 2006
Need help? Got a suggestion? Can't find something?

Please no PMs in reply to a post. Just reply in the thread.
skywalka
Posts: 97
Joined: Fri Oct 18, 2013 4:13 am

Re: CleanImport v1.1.0 [MM3+4]

Post by skywalka »

Hi Steegy,

Would you consider making it possible to remove replay gain tags?

Thanx.
Post Reply