Page 1 of 1

wrong tag is updated

Posted: Fri Dec 28, 2012 3:22 pm
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.

Re: wrong tag is updated

Posted: Sat Dec 29, 2012 3:21 pm
by jtclipper
Can you please download the 0.85 beta and rerun this script?

Re: wrong tag is updated

Posted: Mon Dec 31, 2012 10:24 am
by manu
it seems to work with this beta release.
Thanks