Delete all (unknown) tags

Main discussion forum
Post Reply
corbit
Newbie
Newbie
Posts: 3
Joined: Thu Jul 25, 2013 12:10 pm

Delete all (unknown) tags

Post 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?

User avatar
jtclipper
Administrator
Administrator
Posts: 768
Joined: Tue Aug 10, 2010 12:04 pm

Re: Delete all (unknown) tags

Post 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.

corbit
Newbie
Newbie
Posts: 3
Joined: Thu Jul 25, 2013 12:10 pm

Re: Delete all (unknown) tags

Post 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?

User avatar
jtclipper
Administrator
Administrator
Posts: 768
Joined: Tue Aug 10, 2010 12:04 pm

Re: Delete all (unknown) tags

Post 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.

corbit
Newbie
Newbie
Posts: 3
Joined: Thu Jul 25, 2013 12:10 pm

Re: Delete all (unknown) tags

Post by corbit »

works like a charm!
thank you very very much :)

Post Reply