Otóż mam taki problem, iż po odczytaniu odpowiednich tagów z pliku mp3 nie są one poprawnie wyswietlane w tstringgrid, tylko jakieś głupoty, oczywiście nie wszystkie ale spora część to jaieś kwadraciki itp.
Oto kod źródłowy:
procedure Tforma.Search(dir:string;mask:string);
var
SRec: TSearchRec;
res: Integer;
ec: Char;
pom:string;
begin
ec := ':';
if dir <> '' then ec := dir[Length(dir)];
if (ec <> '') and (ec <> ':') then dir := dir + '';
res := FindFirst(dir + mask, faArchive, SRec);
while res = 0 do
begin
lista.cells[0,lista.rowcount]:=dir + SRec.Name;
lista.cells[1,lista.RowCount]:=FormatFloat('0.00', (srec.size/1024)/1024) ;
lista.cells[2,lista.rowcount]:=TimeToStr(FileDateToDateTime(SRec.Time));
tagi2.tag2mp(dir+srec.name);
if (tag2.tytul=) or (tag2.artysta=
) or (tag2.album='')
then
begin
tagi1.tag1mp(dir+srec.name);
lista.cells[3,lista.rowcount]:=tag1.Title;
lista.cells[4,lista.rowcount]:=tag1.Album;
lista.cells[5,lista.rowcount]:=tag1.Artist;
lista.cells[6,lista.rowcount]:='';
lista.cells[7,lista.rowcount]:=tag1.year;
lista.cells[8,lista.rowcount]:=tag1.Comment;
pom:=tag1.Title+' - '+tag1.Artist+' - '+tag1.Album;
end
else
begin
lista.cells[3,lista.rowcount]:=tag2.Tytul;
lista.cells[4,lista.rowcount]:=tag2.Album;
lista.cells[5,lista.rowcount]:=tag2.Artysta;
lista.cells[6,lista.rowcount]:='';
lista.cells[7,lista.rowcount]:=tag2.Rok;
lista.cells[8,lista.rowcount]:=tag2.Komentarz;
pom:=tag2.tytul+' - '+tag2.artysta+' - '+tag2.album;
end;
lista.rowcount:=lista.rowcount+1;
res := FindNext(SRec);
end;
FindClose(SRec);
res := FindFirst(dir + '*', faDirectory, SRec);
while res = 0 do begin
if (SRec.Attr and faDirectory <> 0)
and (SRec.Name <> '.' ) and (SRec.Name <> '..') then
search(dir + srec.Name,mask);
res := FindNext(SRec);
end;
FindClose(SRec);
end;
Proszę kogos kto ma ochotę lub jakieś doświadczenie w temacie o pomoc.