function GetCount(RoundType: TGikoRoundType): Integer;
function GetRoundItem(Index: Integer; RoundType: TGikoRoundType): TRoundItem;
function ParseRoundBoardLine(Line: string): TRoundItem;
- function ParseRoundThreadLine(Line: string; var BoardList : TStringList): TRoundItem;
+ function ParseRoundThreadLine(Line: string): TRoundItem;
function ParseOldRoundBoardLine(Line: string): TRoundItem;
- function ParseOldRoundThreadLine(Line: string; var BoardList : TStringList): TRoundItem;
+ function ParseOldRoundThreadLine(Line: string): TRoundItem;
public
RoundNameList: TStringList;
begin
idx := Find(Board);
if idx <> -1 then begin
- Item := TRoundItem(FBoardList[idx]);
- Item.Free;
+ TRoundItem(FBoardList[idx]).Free;
FBoardList.Delete(idx);
end;
end;
begin
idx := Find(ThreadItem);
if idx <> -1 then begin
- Item := TRoundItem(FItemList[idx]);
- Item.Free;
+ TRoundItem(FItemList[idx]).Free;
FItemList.Delete(idx);
end;
end;
i: Integer;
begin
for i := FBoardList.Count - 1 downto 0 do begin
- TRoundItem(FBoardList[i]).Free;
+ if FBoardList[i] <> nil then
+ TRoundItem(FBoardList[i]).Free;
FBoardList.Delete(i);
end;
for i := FItemList.Count - 1 downto 0 do begin
- TRoundItem(FItemList[i]).Free;
+ if FItemList[i] <> nil then
+ TRoundItem(FItemList[i]).Free;
FItemList.Delete(i);
end;
end;
errorSl: TStringList;
errorFileName: string;
Item: TRoundItem;
- boardList : TStringList;
+// boardList : TStringList;
begin
- boardList := TStringList.Create;
- boardList.Duplicates := dupIgnore;
+// boardList := TStringList.Create;
+// boardList.Duplicates := dupIgnore;
errorSl := TStringList.Create;
errorSl.Duplicates := dupIgnore;
sl := TStringList.Create;
//\82P\8ds\96Ú\82Í\83o\81[\83W\83\87\83\93
if sl[0] = ROUND_INDEX_VERSION then begin
for i := sl.Count - 1 downto 1 do begin
- Item := ParseRoundThreadLine(sl[i], boardList);
+ Item := ParseRoundThreadLine(sl[i]);
if Item <> nil then begin
FItemList.Add(Item);
RoundNameList.Add(Item.RoundName);
end else begin
LoadRoundBoardFile;
for i := sl.Count - 1 downto 1 do begin
- Item := ParseOldRoundThreadLine(sl[i], boardList);
+ Item := ParseOldRoundThreadLine(sl[i]);
if Item <> nil then begin
FItemList.Add(Item);
RoundNameList.Add(Item.RoundName);
end;
end;
end;
- j := boardList.Count - 1;
- while j >= 0 do begin
- GikoSys.ReadSubjectFile( BBSsFindBoardFromURL( boardList[j] ) );
- boardList.Delete(j);
- Dec(j);
- end;
+// j := boardList.Count - 1;
+// while j >= 0 do begin
+// GikoSys.ReadSubjectFile( BBSsFindBoardFromURL( boardList[j] ) );
+// boardList.Delete(j);
+// Dec(j);
+// end;
if errorSl.Count > 0 then
errorSl.SaveToFile(errorFileName);
end;
finally
sl.Free;
- boardList.Free;
+// boardList.Free;
end;
end;
procedure TRoundList.SaveRoundFile;
end;
end;
-function TRoundList.ParseRoundThreadLine(Line: string; var BoardList : TStringList): TRoundItem;
+function TRoundList.ParseRoundThreadLine(Line: string): TRoundItem;
var
s: string;
i: Integer;
0:
begin
Result.URL := s;
- threadItem := BBSsFindThreadFromURL( s );
- if threadItem <> nil then begin
- BoardList.Add( threadItem.ParentBoard.URL );
- end;
+ //threadItem := BBSsFindThreadFromURL( s );
+ //if threadItem <> nil then begin
+ // BoardList.Add( threadItem.ParentBoard.URL );
+ //end;
end;
1: Result.BoardTitle := s;
2: Result.FileName := s;
end;
end;
-function TRoundList.ParseOldRoundThreadLine(Line: string; var BoardList : TStringList): TRoundItem;
+function TRoundList.ParseOldRoundThreadLine(Line: string): TRoundItem;
var
i: Integer;
s: string;
Result.FileName := s;
board := BBSs[ 0 ].FindBoardFromTitle(Result.BoardTitle);
if board <> nil then begin
- BoardList.Add(board.URL);
+ //BoardList.Add(board.URL);
buf := Copy(board.GetSendURL,1,LastDelimiter('/', board.GetSendURL)-1);
Result.URL := buf + '/read.cgi/'+ board.BBSID+ '/' +ChangeFileExt(s,'') + '/l50';
end else begin