Develop and Download Open Source Software

Browse CVS Repository

Diff of /gikonavigoeson/gikonavi/ItemDownload.pas

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.42 by q9_, Sun Nov 21 07:25:31 2004 UTC revision 1.42.2.1 by h677, Wed May 4 06:25:58 2005 UTC
# Line 103  type Line 103  type
103    
104  implementation  implementation
105    
106    uses
107            Y_TextConverter;
108    
109  constructor TDownloadThread.Create(CreateSuspended: Boolean);  constructor TDownloadThread.Create(CreateSuspended: Boolean);
110  begin  begin
111          inherited Create(CreateSuspended);          inherited Create(CreateSuspended);
# Line 187  begin Line 190  begin
190                          begin                          begin
191                                  FDownloadTitle := FItem.FThreadItem.Title;                                  FDownloadTitle := FItem.FThreadItem.Title;
192                                  if FItem.FThreadItem <> nil then begin                                  if FItem.FThreadItem <> nil then begin
193                                          if FItem.FThreadItem.IsBoardPlugInAvailable then begin                      if FItem.FThreadItem.ParentBoard.IsBoardPlugInAvailable then begin
194                                                  boardPlugIn     := FItem.FThreadItem.BoardPlugIn;                          boardPlugIn := FItem.FThreadItem.ParentBoard.BoardPlugIn;
195                                                  Item.State      := TGikoDownloadState( boardPlugIn.DownloadThread( DWORD( FItem.FThreadItem ) ) );                          Item.State      := TGikoDownloadState( boardPlugIn.DownloadThread( DWORD( FItem.FThreadItem ) ) );
196                                          end;                      end;
197                        //if FItem.FThreadItem.IsBoardPlugInAvailable then begin
198                                            //      boardPlugIn     := FItem.FThreadItem.BoardPlugIn;
199                                            //      Item.State      := TGikoDownloadState( boardPlugIn.DownloadThread( DWORD( FItem.FThreadItem ) ) );
200                                            //end;
201                                  end;                                  end;
202                          end;                          end;
203                  end;                  end;
# Line 763  begin Line 770  begin
770                          Writeln('URL: ' + URL);                          Writeln('URL: ' + URL);
771                          {$ENDIF}                          {$ENDIF}
772                          FIndy.Get(URL, ResStream);                          FIndy.Get(URL, ResStream);
773                          Item.Content := GikoSys.GzipDecompress(ResStream, FIndy.Response.ContentEncoding);              Item.Content := GikoSys.GzipDecompress(ResStream, FIndy.Response.ContentEncoding);
774                if (FIndy.URL.Host = 'be.2ch.net') and (FIndy.URL.Path = '/be/') then begin
775                    Item.Content := EUCtoSJIS(Item.Content);
776                end;
777    
778                          Item.LastModified := FIndy.Response.LastModified;                          Item.LastModified := FIndy.Response.LastModified;
779                          //差分取得で1バイト前からとってきたときはマイナスする                          //差分取得で1バイト前からとってきたときはマイナスする
780  //                      Item.ContentLength := FIndy.Response.ContentLength + AdjustLen;  //                      Item.ContentLength := FIndy.Response.ContentLength + AdjustLen;
# Line 960  var Line 971  var
971                  index := boardItem.GetIndexFromURL( string( inURL ) );                  index := boardItem.GetIndexFromURL( string( inURL ) );
972                  if index = -1 then begin                  if index = -1 then begin
973                          //新しいスレッド                          //新しいスレッド
974                          _ThreadItem := TThreadItem.Create( boardItem.BoardPlugIn, string( inURL ) );                          _ThreadItem := TThreadItem.Create( boardItem.BoardPlugIn, boardItem, string( inURL ) );
975    
976                          _ThreadItem.Title                                       := string( inTitle );                          _ThreadItem.Title                                       := string( inTitle );
977                          _ThreadItem.AllResCount         := inCount;                          _ThreadItem.AllResCount         := inCount;
# Line 1041  begin Line 1052  begin
1052                                  if index = -1 then begin                                  if index = -1 then begin
1053                                          //新しいスレッド                                          //新しいスレッド
1054                                          NewItem := TThreadItem.Create(                                          NewItem := TThreadItem.Create(
1055                          nil, GikoSys.Get2chBoard2ThreadURL( Board, ChangeFileExt( Rec.FFileName, '' ) ) );                                                                  nil,
1056                                    Board,
1057                                    GikoSys.Get2chBoard2ThreadURL( Board, ChangeFileExt( Rec.FFileName, '' ) ) );
1058                                          NewItem.Title := Rec.FTitle;                                          NewItem.Title := Rec.FTitle;
1059                                          NewItem.AllResCount := Rec.FCount;                                          NewItem.AllResCount := Rec.FCount;
1060                                          NewItem.ParentBoard := Board;                                          NewItem.ParentBoard := Board;
# Line 1194  var Line 1207  var
1207  begin  begin
1208          FileName := ThreadItem.GetThreadFileName;          FileName := ThreadItem.GetThreadFileName;
1209    
1210          if not ThreadItem.IsBoardPlugInAvailable then begin          //if not ThreadItem.IsBoardPlugInAvailable then begin
1211        if not ThreadItem.ParentBoard.IsBoardPlugInAvailable then begin
1212                  if Trim(Content) = '' then                  if Trim(Content) = '' then
1213                          Exit;                          Exit;
1214    

Legend:
Removed from v.1.42  
changed lines
  Added in v.1.42.2.1

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26