wrong tag is updated

Use this forum for everything concerning script usage
Post Reply
manu
Newbie
Newbie
Posts: 2
Joined: Fri Dec 28, 2012 3:12 pm

wrong tag is updated

Post by manu »

Hello, I just upgraded to TGF 0.81 (I used 0.81 beta) and my tag scripts is not working anymore. The script updates the wrong tag.

function "tg_SetField( 'Track' , Trim( slMask.Strings[ 0 ] ) );" updates in fact the column "If renamed"
Could it be a bug ?

My script is

program test;

var
sTmp: string;
slMask: TStringList;
sChoice: Integer;

begin

// different syntaxes
sChoice:=1;
// 1= (%) [%] %
// 2= % %
// 3= % - % - %
// 4= %_% - %
// 5= %_%
// 6= (%)[% - %] % - %


if not tg_Init then exit;

slMask := TStringList.Create;
try

repeat

sTmp := tg_GetField( 'File' );
showmessage(tg_GetField( 'Artist' ));

if sChoice=1 then begin
if sys_ApplyMask( '(%) [%] %', sTmp, slMask ) then begin
tg_SetField( 'Track' , Trim( slMask.Strings[ 0 ] ) );
tg_SetField( 'Artist' , Trim( slMask.Strings[ 1 ] ) );
tg_SetField( 'Title' , Trim( slMask.Strings[ 2 ] ) );
end;
end;

// other similar updates for the other choices

until not tg_Skip;

finally
slMask.Free;
end;

end.

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

Re: wrong tag is updated

Post by jtclipper »

Can you please download the 0.85 beta and rerun this script?

manu
Newbie
Newbie
Posts: 2
Joined: Fri Dec 28, 2012 3:12 pm

Re: wrong tag is updated

Post by manu »

it seems to work with this beta release.
Thanks

Post Reply