remove custom tags
-
- Newbie
- Posts: 7
- Joined: Tue Mar 10, 2015 7:59 pm
remove custom tags
Hello,
I am looking for a way to remove some custom tag.
I use MusicBrainz Picard. And it makes me a ton of useless info I'd like to veer right. It is the tag in the "user & sorting".
Two choices because I do not know yet what I want. Remove any tag customize and we only keep the comune basis or otherwise delete specific tag. Basically a kind of delete tag.customtag1 and deletes (not just clear this) the row of that tag.
TY
I am looking for a way to remove some custom tag.
I use MusicBrainz Picard. And it makes me a ton of useless info I'd like to veer right. It is the tag in the "user & sorting".
Two choices because I do not know yet what I want. Remove any tag customize and we only keep the comune basis or otherwise delete specific tag. Basically a kind of delete tag.customtag1 and deletes (not just clear this) the row of that tag.
TY
Re: remove custom tags
This will remove all of the user fields you see in that list.
If you want to remove specific user fields then replace
with
Code: Select all
Program RemoveUser;
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.ExtraFieldsRemove;
gTag.SavetoFile( 0, false );
i := i + 1;
until not tg_skip;
end.
Code: Select all
gTag.ExtraFieldsRemove;
Code: Select all
gTag.ExtraFieldSet( 'FIELD1', '' );
gTag.ExtraFieldSet( 'FIELD2', '' );
...
gTag.ExtraFieldSet( 'FIELDn', '' );
-
- Newbie
- Posts: 7
- Joined: Tue Mar 10, 2015 7:59 pm
Re: remove custom tags
ty i test this later.
There is a doc somewhere to make script ?
There is a doc somewhere to make script ?
-
- Newbie
- Posts: 7
- Joined: Tue Mar 10, 2015 7:59 pm
Re: remove custom tags
hum i have test he clear the row with script as example
but i wan't completely delete the row it's more clean.
Code: Select all
gTag.ExtraFieldSet( 'SCRIPT', '' );
-
- Newbie
- Posts: 7
- Joined: Tue Mar 10, 2015 7:59 pm
Re: remove custom tags
It's not possible ?
so maybe if we save on variable custom field we wan't keep we delete all and next we add the saved field ?
so maybe if we save on variable custom field we wan't keep we delete all and next we add the saved field ?
Re: remove custom tags
List the custom tags that you want to delete and I will provide a script
-
- Newbie
- Posts: 7
- Joined: Tue Mar 10, 2015 7:59 pm
Re: remove custom tags
At the moment i have but it just empty values without deleting the line
I want keep
ACOUSTID ID
MUSICBRAINZ ARTIST ID
MUSICBRAINZ ALBUM ARTIST ID
MUSICBRAINZ RELEASE GROUP ID
MUSICBRAINZ ALBUM ID
MUSICBRAINZ WORK ID
Code: Select all
Program RemoveUser;
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.ExtraFieldSet( 'SCRIPT', '' );
gTag.ExtraFieldSet( 'MUSICBRAINZ ALBUM TYPE', '' );
gTag.ExtraFieldSet( 'BARCODE', '' );
gTag.ExtraFieldSet( 'CATALOGNUMBER', '' );
gTag.ExtraFieldSet( 'WRITER', '' );
gTag.ExtraFieldSet( 'ASIN', '' );
gTag.ExtraFieldSet( 'MUSICBRAINZ ALBUM STATUS', '' );
gTag.ExtraFieldSet( 'MUSICBRAINZ ALBUM RELEASE COUNTRY', '' );
gTag.SavetoFile( 0, false );
i := i + 1;
until not tg_skip;
end.
ACOUSTID ID
MUSICBRAINZ ARTIST ID
MUSICBRAINZ ALBUM ARTIST ID
MUSICBRAINZ RELEASE GROUP ID
MUSICBRAINZ ALBUM ID
MUSICBRAINZ WORK ID
Re: remove custom tags
Try the following script on a couple of files to see if it works as you described
Code: Select all
Program RemoveUser;
var
i: integer;
ACOUSTID_ID,
MUSICBRAINZ_ARTIST_ID,
MUSICBRAINZ_ALBUM_ARTIST_ID,
MUSICBRAINZ_RELEASE_GROUP_ID,
MUSICBRAINZ_ALBUM_ID,
MUSICBRAINZ_WORK_ID : string;
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 );
ACOUSTID_ID := gTag.ExtraFieldGet( 'ACOUSTID ID' );
MUSICBRAINZ_ARTIST_ID := gTag.ExtraFieldGet( 'MUSICBRAINZ ARTIST ID' );
MUSICBRAINZ_ALBUM_ARTIST_ID := gTag.ExtraFieldGet( 'MUSICBRAINZ ALBUM_ARTIST ID' );
MUSICBRAINZ_RELEASE_GROUP_ID := gTag.ExtraFieldGet( 'MUSICBRAINZ RELEASE GROUP ID' );
MUSICBRAINZ_ALBUM_ID := gTag.ExtraFieldGet( 'MUSICBRAINZ_ALBUM ID' );
MUSICBRAINZ_WORK_ID := gTag.ExtraFieldGet( 'MUSICBRAINZ WORK ID' );
gTag.ExtraFieldsRemove;
if ACOUSTID_ID <> '' then gTag.ExtraFieldSet( 'ACOUSTID ID', ACOUSTID_ID );
if MUSICBRAINZ_ARTIST_ID <> '' then gTag.ExtraFieldSet( 'MUSICBRAINZ ARTIST ID', MUSICBRAINZ_ARTIST_ID );
if MUSICBRAINZ_ALBUM_ARTIST_ID <> '' then gTag.ExtraFieldSet( 'MUSICBRAINZ ALBUM_ARTIST ID', MUSICBRAINZ_ALBUM_ARTIST_ID );
if MUSICBRAINZ_RELEASE_GROUP_ID <> '' then gTag.ExtraFieldSet( 'MUSICBRAINZ RELEASE GROUP ID', MUSICBRAINZ_RELEASE_GROUP_ID );
if MUSICBRAINZ_ALBUM_ID <> '' then gTag.ExtraFieldSet( 'MUSICBRAINZ_ALBUM ID', MUSICBRAINZ_ALBUM_ID );
if MUSICBRAINZ_WORK_ID <> '' then gTag.ExtraFieldSet( 'MUSICBRAINZ WORK ID', MUSICBRAINZ_WORK_ID );
gTag.SavetoFile( 0, false );
i := i + 1;
until not tg_skip;
end.
-
- Newbie
- Posts: 7
- Joined: Tue Mar 10, 2015 7:59 pm
Re: remove custom tags
Great (just two _ aren't on extra id.) i have change this it works perfectly. Ty guys
Ps : And good if no extra he don't add blank row.
Ps : And good if no extra he don't add blank row.