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
Alternative to gTag.ResetData
Re: Alternative to gTag.ResetData
I am afraid this method has changed and is not public anymore, you have to clear the fields you want manually
For example:
If you think it's usefull to have something like that I could add it in the next beta builds
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;
Re: Alternative to gTag.ResetData
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
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
Re: Alternative to gTag.ResetData
I'll bring back ResetData in this or the next beta build.
Also keep in mind thatResets 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
Also keep in mind that
Code: Select all
gTag.ExtraFieldsRemove;
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 );
Re: Alternative to gTag.ResetData
jtclipper wrote:I'll bring back ResetData in this or the next beta build.
Also keep in mind thatResets all user tag fields, (those that appear in the full edit dialog under the User field page)Code: Select all
gTag.ExtraFieldsRemove;
If you want to remove tags you could use Tools/Delete/All tags or use this in your scriptCode: Select all
gTag.RemoveFromFile( 0, false, true );
Code: Select all
gTag.RemoveFromFile( 0, false, true );
Re: Alternative to gTag.ResetData
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