Page 1 of 1

Scripting Possibilities

Posted: Tue Dec 28, 2010 8:55 pm
by sushi
Hello everybody,
I started to make scripts with The GodFather to create automatic tags for my MP3 files but finally, I didn't find the right script, the right functions, etc.
Can you help me please ?

I would make a script doing this :
1) Save in variables : the title, the artist and the picture (if existing) of the ID3v2 tags of my MP3 files
2) Remove ID3v1 & ID3v2 tags.
3) Create IDv2 tags with only the title, the artist and the picture (if existing) saved previously.
4) Save the result in the MP3 file.

First, is it possible ?
Somebody got an idea ?

Thanks !  ;)

Re: Scripting Possibilities

Posted: Wed Dec 29, 2010 12:29 pm
by jtclipper
Hello,
First of all go to main options/tags/ID3 and in the update section select ID3v2 and click the remove ID3v1
then use this code to uodate your files

Code: Select all

Program CustomUpdate;

var
  i: integer;
begin

  if not tg_init then exit;
  i := 1;
  sys_SetStatusText( 2, IntToStr( tg_GetRowCount ) );

  repeat

    tg_loadFile;

    sys_SetStatusText( 1, IntToStr( i ) );
    sys_SetStatusText( 3, gTag.Filename );

    gTag.Track := '';
    gTag.Album := '';
    gTag.Genre := '';
    gTag.Year := '';
    gTag.Comment := '';
    gTag.Language := '';
    gTag.Composer := '';
    gTag.Copyright := '';
    gTag.URL := '';
    gTag.EncodedBy := '';
    gTag.Tones := '';
    gTag.Styles := '';
    gTag.Mood := '';
    gTag.Situation := '';
    gTag.Rating := '';
    gTag.Quality := '';
    gTag.Tempo := '';
    gTag.Type_ := '';

    gTag.OrigAlbum := '';
    gTag.OrigArtist := '';
    gTag.OrigYear := '';
    gTag.Performer := '';
    gTag.Description := '';
    gTag.Subtitle := '';
    gTag.ContentGroup := '';
    gTag.Conductor := '';
    gTag.Band := '';
    gTag.MixArtist := '';
    gTag.PartInSet := '';
    gTag.MediaType := '';
    gTag.Publisher := '';
    gTag.EncoderSettings := '';
    gTag.RecordDate := '';
    gTag.RecordLocation := '';
    gTag.Organization := '';
    gTag.Catalog := '';
    gTag.EAN_UPC := '';
    gTag.ISBN := '';
    gTag.LC := '';
    gTag.ISRC := '';
    gTag.BPM := '';
    gTag.InvolvedPeople := '';
    gTag.WWWCommercialInfo := '';
    gTag.WWWCopyright := '';
    gTag.WWWAudioFile := '';
    gTag.WWWArtist := '';
    gTag.WWWAudioSource := '';
    gTag.WWWRadioPage := '';
    gTag.WWWPayment := '';
    gTag.WWWPublisher := '';
    gTag.Lyrics := '';
    gTag.Lyricist := '';
    gTag.OrigLyricist := '';

    gTag.ExtraFieldsRemove;

    gTag.SaveToFile( 0, false, '', false );

    tg_setresult( 'OK' );

    Inc( i );

  until not tg_skip;

end.
Might seem long but it is faster than saving or removing fields/tags first and saves a lot of file IO.

It will not update the values in the grid (clean clomuns not used ) but that can be easily done also

Re: Scripting Possibilities

Posted: Wed Dec 29, 2010 9:22 pm
by sushi
Thank you very much !
Finally this way is the best.

But I still have some questions :

Is there a gTag property for : Date, Time, Original Filename, File owner/licensee, Internet radio station name & Internet radio station owner ? (I found these properties in the "More data" tab of the Full Tag Edit mode)

Re: Scripting Possibilities

Posted: Thu Dec 30, 2010 8:55 am
by jtclipper
Unfortunetly those properties and a few others that belong to specific tag types (ID3v2 only, mp4 only and so on ) are not published in gTag.
Keeping a note of that though and will try to add more support for those.

Re: Scripting Possibilities

Posted: Sun Jan 02, 2011 1:39 am
by sushi
Ok cool.
Thank you very much !  ;)