procedure TForm1.Button3Click(Sender: TObject);
var
S: string;
I: Integer;
begin
RichEdit1.Clear;
if DBCheckBox12.Checked then
begin
Response := TStringList.Create;
try
Response.Text := IdHTTP1.Get('http://server/radio/Zakladni.m3u');
for I := 0 to Response.Count - 1 do
begin
S := Response[I];
if TryAppendLogin(S, DBEdit7.Text, DBEdit8.Text) then
Response[I] := S;
end;
RichEdit1.Lines.AddStrings(Response);
finally
Response.Free;
end;
end;
if DBCheckBox8.Checked then
begin
Response1 := TStringList.Create;
try
Response1.Text := IdHTTP1.Get('http://server/radio/TOP.m3u');
for I := 0 to Response1.Count - 1 do
begin
S := Response1[I];
if TryAppendLogin(S, DBEdit7.Text, DBEdit8.Text) then
Response1[I] := S;
end;
RichEdit1.Lines.AddStrings(Response1);
finally
Response.Free;
end;
end;
if DBCheckBox9.Checked then
begin
Response := TStringList.Create;
try
Response.Text := IdHTTP1.Get('http://http://server/radio/Country.m3u');
for I := 0 to Response.Count - 1 do
begin
S := Response[I];
if TryAppendLogin(S, DBEdit7.Text, DBEdit8.Text) then
Response[I] := S;
end;
RichEdit1.Lines.AddStrings(Response);
finally
Response.Free;
end;
end;
if DBCheckBox4.Checked then
begin
Response := TStringList.Create;
try
Response.Text := IdHTTP1.Get('http://server/radio/folk.m3u');
for I := 0 to Response.Count - 1 do
begin
S := Response[I];
if TryAppendLogin(S, DBEdit7.Text, DBEdit8.Text) then
Response[I] := S;
end;
RichEdit1.Lines.AddStrings(Response);
finally
Response.Free;
end;
end;
if DBCheckBox7.Checked then
begin
Response := TStringList.Create;
try
Response.Text := IdHTTP1.Get('http://server/radio/bit.m3u');
for I := 0 to Response.Count - 1 do
begin
S := Response[I];
if TryAppendLogin(S, DBEdit7.Text, DBEdit8.Text) then
Response[I] := S;
end;
RichEdit1.Lines.AddStrings(Response);
finally
Response.Free;
end;
end;
if DBCheckBox5.Checked then
begin
Response := TStringList.Create;
try
Response.Text := IdHTTP1.Get('http://server/radio/detske.m3u');
for I := 0 to Response.Count - 1 do
begin
S := Response[I];
if TryAppendLogin(S, DBEdit7.Text, DBEdit8.Text) then
Response[I] := S;
end;
RichEdit1.Lines.AddStrings(Response);
finally
Response.Free;
end;
end;
if DBCheckBox3.Checked then
begin
Response := TStringList.Create;
try
Response.Text := IdHTTP1.Get('http://server/radio/vazna.m3u');
for I := 0 to Response.Count - 1 do
begin
S := Response[I];
if TryAppendLogin(S, DBEdit7.Text, DBEdit8.Text) then
Response[I] := S;
end;
RichEdit1.Lines.AddStrings(Response);
finally
Response.Free;
end;
end;
if DBCheckBox1.Checked then
begin
Response := TStringList.Create;
try
Response.Text := IdHTTP1.Get('http://server/radio/moderni.m3u');
for I := 0 to Response.Count - 1 do
begin
S := Response[I];
if TryAppendLogin(S, DBEdit7.Text, DBEdit8.Text) then
Response[I] := S;
end;
RichEdit1.Lines.AddStrings(Response);
finally
Response.Free;
end;
end;
if DBCheckBox2.Checked then
begin
Response := TStringList.Create;
try
Response.Text := IdHTTP1.Get('http://server/radio/hause.m3u');
for I := 0 to Response.Count - 1 do
begin
S := Response[I];
if TryAppendLogin(S, DBEdit7.Text, DBEdit8.Text) then
Response[I] := S;
end;
RichEdit1.Lines.AddStrings(Response);
finally
Response.Free;
end;
end;
if DBCheckBox10.Checked then
begin
Response := TStringList.Create;
try
Response.Text := IdHTTP1.Get('http://server/radio/ostatni.m3u');
for I := 0 to Response.Count - 1 do
begin
S := Response[I];
if TryAppendLogin(S, DBEdit7.Text, DBEdit8.Text) then
Response[I] := S;
end;
RichEdit1.Lines.AddStrings(Response);
finally
Response.Free;
end;
end;
RichEdit1.Lines.SaveToFile('test.m3u');