Torben,
Is there a way to get the ID3 Year field ? I ask because a station is running a software RDS generator and wishes to display “Songs from 19xx” on the RadioText scrolling display.
You could parse the text displayed in the Details tab of the Properties dialog. This text can also be accessed through the GetInfo function of the IPlaylistItem interface. However, I have just noticed that this function is broken. I will upload a bugfix tomorrow, and then post an example script here.
Torben
Please update to mAirList 2.0.2 in order to make the GetInfo function work again.
The following script demonstrates how to parse the GetInfo output and look for the “ID3v2 Year” line:
[code]var sl: TStringList;
i: integer;
pl: IPlaylistItem;
year, decade: integer;
begin
pl := CurrentPlaylist.GetItem(0);
sl := pl.GetInfo;
for i := 0 to sl.Count - 1 do
if copy(sl[i], 1, 12) = 'ID3v2 Year: ’ then begin
year := StrToInt(copy(sl[i], 13, 4));
decade := year div 10 * 10;
SystemLog('Now playing: Songs from the ’ + IntToStr(decade) + ‘s’);
end;
end.[/code]
Torben