Page 1 of 1

Delete all (unknown) tags

Posted: Thu Jul 25, 2013 12:19 pm
by corbit
Using a previous version of TGF i worked the following steps:
1. edit main tags in the grid, based on values provided with the original mp3s
2. delete all tags (from the files, not from the grid) to get rid of everything but the music
3. apply the values from step one

This way i got clean files that only included the information i put in with TGF and none of the unknown/pseudo-fields or overhead someone else produced before me.

With 0.85 i'm not able to do this anymore because as soon i use "Delete -> All Tags", all the information/changes in the grid are lost.
Can you tell me a workaround to achieve the result described above?
Or did i just not see the option to keep the changes in the grid?

Re: Delete all (unknown) tags

Posted: Thu Jul 25, 2013 5:58 pm
by jtclipper
The easiest way to do this is with a script.

Code: Select all

program Clean;

begin
  if not tg_Init then exit; // no rows get out
  repeat
    
    tg_LoadFile;
    if gTag.RemoveFromFile(0,false,false); //physically remove the tag

       //clean unwanted fields from the grid
       tg_setField( 'OrigAlbum', '' );
       //..
       //..
       //..

       tg_setResult( 'OK' );
    end;

  until not tg_Skip;
end.
Because the grid now has more fields than the old version it might be useful for you to set those fields to blank, I have an example there with original album that can be extended to include more columns.

So you run this script, then click update. After that only the text values shown in the grid will populate each files tag.

Re: Delete all (unknown) tags

Posted: Tue Jul 30, 2013 9:26 pm
by corbit
thanks, but while running that script an error occurs:
Compiler:[Error] (8:42): 'THEN' expected
I'm not used to scripts and the language used. Can you help me out, please?

Re: Delete all (unknown) tags

Posted: Wed Jul 31, 2013 5:18 pm
by jtclipper
This is the correct script

Code: Select all

program Clean;

begin

  if not tg_Init then exit; // no rows get out
  repeat
   
    tg_LoadFile;
    if gTag.RemoveFromFile(0,false,false) then begin //physically remove tag

       //clean unwanted fields from the grid
       tg_setField( 'OrigAlbum', '' );
       //..
       //..
       //..

       tg_setResult( 'OK' );
    end;

  until not tg_Skip;

end.

Re: Delete all (unknown) tags

Posted: Sun Aug 11, 2013 9:28 pm
by corbit
works like a charm!
thank you very very much :)