Alternative to gTag.ResetData

Use this forum for everything concerning script usage
Post Reply
Benji99
Newbie
Newbie
Posts: 8
Joined: Thu Dec 02, 2010 7:51 pm

Alternative to gTag.ResetData

Post by Benji99 »

Hi Dimitri,

I've been reworking one of my scripts and noticed that I'm not able to use the command gTag.ResetData anymore to wipe all tags before making any changes.

Is there an alternative that I can use?

Thanks in advance

Sebastien

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

Re: Alternative to gTag.ResetData

Post by jtclipper »

I am afraid this method has changed and is not public anymore, you have to clear the fields you want manually

For example:

Code: Select all

with gTag do begin
   //standard    
   Track := '';
   Artist := '';
   Title := '';
   Album := '';
   Genre := '';
   Year := '';
   Comment := '';
   Language := '';
   Composer := '';
   Copyright := '';
   URL := '';
   EncodedBy := '';
   AlbumArtist := '';
   OrigArtist := '';
   Publisher := '';
   BPM := '';
   DiscNumber := '';
   Tones := '';
   Styles := '';
   Mood := '';
   Situation := '';
   Rating := '';
   Quality := '';
   Tempo := '';
   Type_ := '';
   OrigAlbum := '';
   OrigYear := '';
   MixArtist := '';
   // extended fields
   OriginalFilename := '';
   FileOwner := '';
   InternetRadioStationName := '';
   InternetRadioStationOwner := '';
   Subtitle := '';
   ContentGroup := '';
   Conductor := '';
   MediaType := '';
   EncoderSettings := '';
   ISRC := '';
   Compilation := false;
   //sorting
   sortArtist := '';
   sortAlbum := '';
   sortAlbumArtist  := '';
   sortTitle := '';
   sortComposer := '';
   // iPLS URL's
   InvolvedPeople := '';
   WWWCommercialInfo := '';
   WWWCopyright := '';
   WWWAudioFile := '';
   WWWArtist := '';
   WWWAudioSource := '';
   WWWRadioPage := '';
   WWWPayment := '';
   WWWPublisher := '';
   //lyrics
   Lyrics := '';
   Lyricist := '';
   OrigLyricist := '';
   //pictures
   ClearPictures;
   //user fields
   ExtraFieldsRemove;
end;
If you think it's usefull to have something like that I could add it in the next beta builds

Benji99
Newbie
Newbie
Posts: 8
Joined: Thu Dec 02, 2010 7:51 pm

Re: Alternative to gTag.ResetData

Post by Benji99 »

Thanks for the information, although I have used some other custom tags in the past and I'd have to add all of the possibilities.
Because I was designing my scripts to be scrape and tag perfectly, and always strove to keep my tags clean of unneeded or unnused information, I was using the resetdata function to make sure the result after running the script was exactly what I wanted.

It would be really nice if you could re-implement it, in the meantime, I'll probably just remove all tags in Foobar before proceeding with running my script in TGF.

Thanks big time for the continued development!

Sebastien

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

Re: Alternative to gTag.ResetData

Post by jtclipper »

I'll bring back ResetData in this or the next beta build.

Also keep in mind that

Code: Select all

gTag.ExtraFieldsRemove;
Resets all user tag fields, (those that appear in the full edit dialog under the User field page)

If you want to remove tags you could use Tools/Delete/All tags or use this in your script

Code: Select all

gTag.RemoveFromFile( 0, false, true );

Benji99
Newbie
Newbie
Posts: 8
Joined: Thu Dec 02, 2010 7:51 pm

Re: Alternative to gTag.ResetData

Post by Benji99 »

jtclipper wrote:I'll bring back ResetData in this or the next beta build.

Also keep in mind that

Code: Select all

gTag.ExtraFieldsRemove;
Resets all user tag fields, (those that appear in the full edit dialog under the User field page)

If you want to remove tags you could use Tools/Delete/All tags or use this in your script

Code: Select all

gTag.RemoveFromFile( 0, false, true );

Code: Select all

gTag.RemoveFromFile( 0, false, true );
Sounds like it does exactly what I want, maybe you don't need to add back ResetData? Is there a difference?

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

Re: Alternative to gTag.ResetData

Post by jtclipper »

ResetData will make things a bit faster it will basically 'remove' the tag without saving the file back to disk until the rest of the script take care of that

Post Reply