• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

ギコナビ


Commit MetaInfo

Revisiond5d9969ea515d270715f5d6d5f8ee0992b638012 (tree)
Time2004-10-03 03:37:56
Authorcvs2git <cvs2git>
Commitercvs2git

Log Message

This commit was manufactured by cvs2svn to create tag 'v1_49_0_548'.

Change Summary

Incremental Difference

--- a/Giko.pas
+++ b/Giko.pas
@@ -2911,9 +2911,8 @@ begin
29112911 if (PathRec.FNoParam) then begin
29122912 PathRec.FSt := 1;
29132913 PathRec.FTo := 1;
2914- end else begin
2914+ end else
29152915 Gikosys.GetPopupResNumber(URL,PathRec.FSt,PathRec.FTo);
2916- end;
29172916 GikoSys.ParseURI( URL, Protocol, Host, Path, Document, Port, Bookmark );
29182917
29192918 if PathRec.FDone or (not GikoSys.Is2chHost( Host )) then begin
@@ -2940,10 +2939,10 @@ begin
29402939 // wkIntTo := 1;
29412940 //if PathRec.FFirst then
29422941 // wkIntSt := 1;
2943- //if PathRec.FStBegin then //http://````/-50‚Æ‚¢‚¤‚Æ‚«
2944- // wkIntSt := 1; //
2945- //if PathRec.FToEnd then //http://````/50-‚Æ‚¢‚¤‚Æ‚«
2946- // wkIntTo := 9999; // ‚Ç‚¿‚ç‚̏ꍇ‚àAGetPopupResNumber‚Å‚¤‚Ü‚­”ԍ†‚𒲐®‚·‚é‚̂łӂ悤B
2942+ if PathRec.FStBegin then
2943+ wkIntSt := 1;
2944+ if PathRec.FToEnd then
2945+ wkIntTo := 9999;
29472946
29482947 //ATitle := ActiveFileName <> PathRec.FKey;
29492948 if (FActiveContent <> nil) and (FActiveContent.Thread.URL = URL) then
@@ -3671,7 +3670,7 @@ begin
36713670 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
36723671 if TObject(BrowserTab.Tabs.Objects[i]) is TBrowserRecord then begin
36733672 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = ThreadItem then begin
3674- Result := TBrowserRecord( BrowserTab.Tabs.Objects[i] );
3673+ Result := TBrowserRecord( BrowserTab.Tabs.Objects[j] );
36753674 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser = nil then begin
36763675 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
36773676 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
@@ -3859,13 +3858,11 @@ begin
38593858
38603859
38613860 try
3862- {
38633861 if ThreadItem.UnRead then begin
38643862 ThreadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1;
38653863 if ThreadItem.ParentBoard.UnRead < 0 then ThreadItem.ParentBoard.UnRead := 0;
38663864 TreeView.Refresh;
38673865 end;
3868- }
38693866 if(FActiveContent <> nil) and (FActiveContent <> Thread) then begin
38703867 if (FActiveContent.Browser <> BrowserNullTab.Browser) then
38713868 ShowWindow(FActiveContent.Browser.Handle, SW_HIDE);
@@ -4008,16 +4005,12 @@ end;
40084005 procedure TGikoForm.SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean);
40094006 var
40104007 Board: TBoard;
4011- i: Integer;
40124008 begin
40134009 if ActiveList is TBoard then begin
4014- for i := Length( BBSs ) - 1 downto 0 do begin
4015- BBSs[i].SelectText := SelectText;
4016- BBSs[i].KubetsuChk := KubetsuChk;
4017- end;
40184010 Board := TBoard(ActiveList);
4019-// Board.ParentCategory.ParenTBBS.SelectText := SelectText;
4020-// Board.ParentCategory.ParenTBBS.KubetsuChk := KubetsuChk;
4011+
4012+ Board.ParentCategory.ParenTBBS.SelectText := SelectText;
4013+ Board.ParentCategory.ParenTBBS.KubetsuChk := KubetsuChk;
40214014 // Board.SelectText := SelectText;
40224015 // Board.KubetsuChk := KubetsuChk;
40234016 ViewType := AViewType;
@@ -6695,20 +6688,10 @@ begin
66956688 threadItem := BrowserRecord.Thread;
66966689
66976690 if (BrowserRecord <> nil) and (Length( BrowserRecord.Movement ) > 0) then begin
6698- if threadItem.UnRead then begin
6699- threadItem.UnRead := False;
6700- threadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1;
6701- if threadItem.ParentBoard.UnRead < 0 then threadItem.ParentBoard.UnRead := 0;
6702- TreeView.Refresh;
6703- ListView.Refresh;
6704- end;
67056691 BrowserMovement( BrowserRecord.Movement, BrowserRecord );
67066692 BrowserRecord.Movement := '';
67076693 end else if threadItem.UnRead then begin
67086694 threadItem.UnRead := False;
6709- threadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1;
6710- if threadItem.ParentBoard.UnRead < 0 then threadItem.ParentBoard.UnRead := 0;
6711- TreeView.Refresh;
67126695 BrowserMovement( 'new', BrowserRecord );
67136696 ListView.Refresh;
67146697 end else if threadItem.ScrollTop <> 0 then begin
@@ -9010,10 +8993,9 @@ begin
90108993 ModifySelectList;
90118994 end else if Length( SelectComboBox.Text ) = 0 then
90128995 begin
9013- {* SelectComboBox.Text‚ª‹ó‚Å‚àA“ü—Í“r’†‚ÅEsc‚µ‚½‚Æ‚©
9014- * ‹ó‚Ì‚Æ‚«‚ÉDelƒL[‚ð‰Ÿ‚µ‚½‚Æ‚©‚Ȃ̂ŁAƒXƒŒ‚̍iž‚Ý‚ðˆÛŽ‚·‚éB
9015- * i‚±‚±‚ł͉½‚à‚µ‚È‚¢j
9016- *}
8996+ AllItemAction.Checked := True;
8997+ LogItemAction.Checked := False;
8998+ NewItemAction.Checked := False;
90178999 end else begin
90189000 // ƒ`ƒ‰‚‚­‚ÆŒ™‚¾‚©‚çAˆê‰ž‰Ÿ‚µ‚Ä‚ ‚é‚Æ‚«‚¾‚¯ˆ—‚·‚é
90199001 if AllItemAction.Checked then
@@ -11165,16 +11147,12 @@ begin
1116511147 SelectListItem(List);
1116611148 for i := 0 to List.Count - 1 do begin
1116711149 if TObject(List[i]) is TThreadItem then begin
11168- if (TThreadItem(List[i]).UnRead) then begin
11169- TThreadItem(List[i]).UnRead := false;
11170- TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead - 1;
11171- end;
11150+ TThreadItem(List[i]).UnRead := false;
11151+ TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead - 1;
1117211152 end;
1117311153 end;
1117411154 if TreeView.Visible then
1117511155 TreeView.Refresh;
11176- if ListView.Visible then
11177- ListView.Refresh;
1117811156 finally
1117911157 List.Free;
1118011158 end;
@@ -11190,16 +11168,12 @@ begin
1119011168 SelectListItem(List);
1119111169 for i := 0 to List.Count - 1 do begin
1119211170 if TObject(List[i]) is TThreadItem then begin
11193- if (TThreadItem(List[i]).IsLogFile) and (not TThreadItem(List[i]).UnRead) then begin
11194- TThreadItem(List[i]).UnRead := true;
11195- TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead + 1;
11196- end;
11171+ TThreadItem(List[i]).UnRead := true;
11172+ TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead + 1;
1119711173 end;
1119811174 end;
1119911175 if TreeView.Visible then
1120011176 TreeView.Refresh;
11201- if ListView.Visible then
11202- ListView.Refresh;
1120311177 finally
1120411178 List.Free;
1120511179 end;
--- a/ItemDownload.pas
+++ b/ItemDownload.pas
@@ -1259,10 +1259,8 @@ begin
12591259 OldCnt := Body.IndexOf(oldBody.Strings[ LastIdx ]) + 1;
12601260 until ( OldCnt <> 0 ) or (LastIdx = 0);
12611261
1262- if OldCnt >= Body.Count then OldCnt := Body.Count - 1;
12631262 NewRes := Body.Count - OldCnt;
12641263
1265-
12661264 finally
12671265 oldBody.Free;
12681266 end;
@@ -1299,10 +1297,8 @@ begin
12991297 ThreadItem.AllResCount := ThreadItem.Count;
13001298 ThreadItem.IsLogFile := True;
13011299 ThreadItem.RoundDate := Now;
1302- if not ThreadItem.UnRead then begin
1303- ThreadItem.UnRead := True;
1304- ThreadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead + 1;
1305- end;
1300+ ThreadItem.UnRead := True;
1301+ ThreadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead + 1;
13061302 // if ThreadItem.RoundNo = 6 then
13071303 // ThreadItem.RoundNo := 0;
13081304
Binary files a/gikoNavi.res and b/gikoNavi.res differ
--- a/readme/readme.txt
+++ b/readme/readme.txt
@@ -89,7 +89,7 @@ Windows Server 2003 Enterprise Edition IE6
8989 ------------------------------
9090 —š—ð
9191 ------------------------------
92-2004/10/XX
92+2004/XX/XX
9393 Version ÊÞÀ49
9494 ‚¨‹C‚É“ü‚è‚̓ǂݍž‚݂̍‚‘¬‰»‚É‚æ‚é‹N“®ŽžŠÔ‚Ì’Zk
9595 StatusBar‚ÉNGƒ[ƒhƒtƒ@ƒCƒ‹‚Ì–¼‘O‚ªo‚È‚¢•s‹ï‡‚̏C³
@@ -101,8 +101,6 @@ Windows Server 2003 Enterprise Edition IE6
101101 ƒfƒtƒHƒ‹ƒg‚ł̃ŒƒXƒAƒ“ƒJ[ƒ|ƒbƒvƒAƒbƒv‚ªŽíŽí‚ÌŒ`Ž®‚ɑΉž
102102 ‚R‚¿‚á‚ñ‚Ë‚éi8‚¿‚á‚ñ‚Ë‚éj‚ð“o˜^‚·‚é‚Æ‚Q‚¿‚á‚ñ‚Ë‚é‚̔‚ª•\Ž¦‚³‚ê‚é•s‹ï‡‚̉ðÁ
103103 ‚¨‹C‚É“ü‚è‚ŕҏW’†‚ɃXƒy[ƒXƒL[“ü—Í‚Ì•s‹ï‡‚̏C³
104- ‚µ‚½‚ç‚ÎJBBS‚̉ߋŽƒƒO‚ÉŠÖ‚·‚é•s‹ï‡‚̏C³
105- ƒXƒŒƒbƒh‚̃Šƒ“ƒN‚ŃŒƒX”Ô‚ª‚ ‚é‚à‚̂𓥂ñ‚¾‚Æ‚«‚ɁA‚»‚̃ŒƒX”ԍ†‚܂ŃXƒNƒ[ƒ‹‚·‚é‚悤‚É‚µ‚½B
106104
107105 2004/09/05
108106 Version ÊÞÀ48
--- a/res/ExternalBoardPlugIn/ShitarabaJBBSPlugIn.dpr
+++ b/res/ExternalBoardPlugIn/ShitarabaJBBSPlugIn.dpr
@@ -3,7 +3,7 @@ library ShitarabaJBBSPlugIn;
33 {
44 ShitarabaJBBSPlugIn
55 ‚µ‚½‚ç‚Ώˆ—ƒ†ƒjƒbƒg
6- $Id: ShitarabaJBBSPlugIn.dpr,v 1.36 2004/09/30 11:49:44 h677 Exp $
6+ $Id: ShitarabaJBBSPlugIn.dpr,v 1.34 2004/09/29 15:52:15 h677 Exp $
77 }
88
99 uses
@@ -33,7 +33,7 @@ type
3333
3434 private
3535 function Download : TDownloadState;
36- function StorageDownload(AURL : string) : TDownloadState;
36+ function StorageDownload(Path, Document : string) : TDownloadState;
3737 function Write( inName : string; inMail : string; inMessage : string ) : TDownloadState;
3838 function GetRes( inNo : Integer ) : string;
3939 function GetDat( inNo : Integer ) : string;
@@ -505,14 +505,24 @@ begin
505505 uriList := TStringList.Create;
506506 try
507507 ExtractHttpFields( ['/', '?'], [], uri.Path, uriList );
508- if uriList[ 5 ] = 'l100' then begin
509- FileName := uriList[ 4 ] + '.dat';
510- FilePath := MyLogFolder + uriList[ 2 ] + '\' + uriList[ 3 ] + '\' + uriList[ 4 ] + '.dat';
511- IsLogFile := FileExists( FilePath );
512- end else begin
513- FileName := uriList[ 5 ] + '.dat';
514- FilePath := MyLogFolder + uriList[ 3 ] + '\' + uriList[ 4 ] + '\' + uriList[ 5 ] + '.dat';
508+ if (AnsiPos('.html', uri.Document) = 0) then begin //’ʏí
509+ if uriList[ 5 ] = 'l100' then begin
510+ FileName := uriList[ 4 ] + '.dat';
511+ FilePath := MyLogFolder + uriList[ 2 ] + '\' + uriList[ 3 ] + '\' + uriList[ 4 ] + '.dat';
512+ IsLogFile := FileExists( FilePath );
513+ end else begin
514+ FileName := uriList[ 5 ] + '.dat';
515+ FilePath := MyLogFolder + uriList[ 3 ] + '\' + uriList[ 4 ] + '\' + uriList[ 5 ] + '.dat';
516+ IsLogFile := FileExists( FilePath );
517+ end;
518+ end else begin //‰ß‹ŽƒƒO
519+ //http://jbbs.livedoor.com/game/1578/storage/1086710948.html
520+ FileName := Copy(uri.Document, 1, Length(uri.Document) - 5) + '.dat';
521+ FilePath := MyLogFolder + CustomStringReplace(CustomStringReplace(uri.Path, '/storage', ''), '/', '\') + FileName;
515522 IsLogFile := FileExists( FilePath );
523+ URL := uri.Protocol + '://' + uri.Host + '/bbs/read.cgi' +
524+ CustomStringReplace(uri.Path, '/storage', '') + CustomStringReplace(uri.Document, '.html', '/');
525+
516526 end;
517527 finally
518528 uri.Free;
@@ -556,102 +566,117 @@ begin
556566 Result := dsError;
557567
558568 uri := TIdURI.Create( ReadURL );
559- uriList := TStringList.Create;
560- try
561- ExtractHttpFields( ['/', '?'], [], uri.Path, uriList );
562- FileName := uriList[ 5 ] + '.dat';
563- // http://jbbs.livedoor.com/bbs/rawmode.cgi/game/1578/1067968274/l100
564- // protocol://host/1/2/3/4/5/uriList.Count - 1
565- if MyLogFolder = '' then begin
566- // ‚Ç‚±‚É•Û‘¶‚µ‚Ä‚¢‚¢‚Ì‚©•ª‚©‚ç‚È‚¢‚̂ňꎞƒtƒ@ƒCƒ‹‚É•Û‘¶
567- FilePath := TemporaryFile;
568- FIsTemporary := True;
569- end else begin
570- FilePath := MyLogFolder + uriList[ 3 ] + '\' + uriList[ 4 ] + '\' + uriList[ 5 ] + '.dat';
571- FIsTemporary := False;
572- end;
573- finally
569+ if(( AnsiPos('.html', uri.Document) >0 ) and ( AnsiPos('/storage/', uri.Path) > 0 )) then begin
570+ //‚à‚¤‚±‚±‚É‚Í“ü‚Á‚Ä‚±‚È‚¢‚©‚àB
571+ //‰ß‹ŽƒƒO
572+ //http://jbbs.shitaraba.jp/bbs/read.cgi/game/3477/1077473358/
573+ //http://jbbs.shitaraba.jp/game/bbs/read.cgi?BBS=3477&KEY=1077473358
574+ //http://jbbs.shitaraba.jp/game/3477/storage/1077473358.html
575+ Result := StorageDownload(uri.Path, uri.Document);
576+ URL := uri.Protocol + '://' + uri.Host + '/bbs/read.cgi/' +
577+ CustomStringReplace(uri.Path, '/storage', '') + CustomStringReplace(uri.Document, '.html', '/');
574578 uri.Free;
575- uriList.Free;
576- end;
577579
578- // •Û‘¶—p‚̃fƒBƒŒƒNƒgƒŠ‚ðŒ@‚é
579- ForceDirectoriesEx( Copy( FilePath, 1, LastDelimiter( '\', FilePath ) ) );
580+ end else begin
581+ //Œ»Ý¶‚«‚Ä‚éƒXƒŒƒbƒh
582+ uriList := TStringList.Create;
583+ try
584+ ExtractHttpFields( ['/', '?'], [], uri.Path, uriList );
585+ FileName := uriList[ 5 ] + '.dat';
586+ // http://jbbs.livedoor.com/bbs/rawmode.cgi/game/1578/1067968274/l100
587+ // protocol://host/1/2/3/4/5/uriList.Count - 1
588+ if MyLogFolder = '' then begin
589+ // ‚Ç‚±‚É•Û‘¶‚µ‚Ä‚¢‚¢‚Ì‚©•ª‚©‚ç‚È‚¢‚̂ňꎞƒtƒ@ƒCƒ‹‚É•Û‘¶
590+ FilePath := TemporaryFile;
591+ FIsTemporary := True;
592+ end else begin
593+ FilePath := MyLogFolder + uriList[ 3 ] + '\' + uriList[ 4 ] + '\' + uriList[ 5 ] + '.dat';
594+ FIsTemporary := False;
595+ end;
596+ finally
597+ uri.Free;
598+ uriList.Free;
599+ end;
580600
581- // “ÆŽ©‚Ƀ_ƒEƒ“ƒ[ƒh‚âƒtƒBƒ‹ƒ^ƒŠƒ“ƒO‚ðs‚í‚È‚¢ê‡‚Í
582- // InternalDownload ‚É”C‚¹‚邱‚Æ‚ªo—ˆ‚é
583- modified := LastModified;
584- datURL := ReadURL + IntToStr( Count + 1 ) + '-'; // V’…‚Ì‚Ý
585- responseCode := InternalDownload( PChar( datURL ), modified, tmp, 0 );
601+ // •Û‘¶—p‚̃fƒBƒŒƒNƒgƒŠ‚ðŒ@‚é
602+ ForceDirectoriesEx( Copy( FilePath, 1, LastDelimiter( '\', FilePath ) ) );
586603
587- try
588- if (responseCode = 200) or (responseCode = 206) then begin
589- downResult := TStringList.Create;
590- try
591- tmpText := CustomStringReplace( string( tmp ), '¡÷¡®', ',' );
592- downResult.Text := EUCtoSJIS( tmpText );
593- ArrangeDownloadData(Count, downResult);
594- if downResult.Count > 0 then begin
595- if FileExists( FilePath ) then
596- logStream := TFileStream.Create( FilePath, fmOpenReadWrite or fmShareDenyWrite )
597- else
598- logStream := TFileStream.Create( FilePath, fmCreate or fmShareDenyWrite );
599- try
600- logStream.Position := logStream.Size;
601- logStream.Write( PChar( downResult.Text )^, Length( downResult.Text ) );
602- finally
603- logStream.Free;
604- end;
604+ // “ÆŽ©‚Ƀ_ƒEƒ“ƒ[ƒh‚âƒtƒBƒ‹ƒ^ƒŠƒ“ƒO‚ðs‚í‚È‚¢ê‡‚Í
605+ // InternalDownload ‚É”C‚¹‚邱‚Æ‚ªo—ˆ‚é
606+ modified := LastModified;
607+ datURL := ReadURL + IntToStr( Count + 1 ) + '-'; // V’…‚Ì‚Ý
608+ responseCode := InternalDownload( PChar( datURL ), modified, tmp, 0 );
609+
610+ try
611+ if (responseCode = 200) or (responseCode = 206) then begin
612+ downResult := TStringList.Create;
613+ try
614+ tmpText := CustomStringReplace( string( tmp ), '¡÷¡®', ',' );
615+ downResult.Text := EUCtoSJIS( tmpText );
616+ ArrangeDownloadData(Count, downResult);
617+ if downResult.Count > 0 then begin
618+ if FileExists( FilePath ) then
619+ logStream := TFileStream.Create( FilePath, fmOpenReadWrite or fmShareDenyWrite )
620+ else
621+ logStream := TFileStream.Create( FilePath, fmCreate or fmShareDenyWrite );
622+ try
623+ logStream.Position := logStream.Size;
624+ logStream.Write( PChar( downResult.Text )^, Length( downResult.Text ) );
625+ finally
626+ logStream.Free;
627+ end;
605628
606- if Count = 0 then
607- // V‹K
608- Result := dsComplete
609- else
610- // ’Ç‹L
611- Result := dsDiffComplete;
629+ if Count = 0 then
630+ // V‹K
631+ Result := dsComplete
632+ else
633+ // ’Ç‹L
634+ Result := dsDiffComplete;
612635
613- Size := Size + Length( downResult.Text );
614- // CGI ‚©‚ç‚͐³‚µ‚¢“ú•t‚ª“¾‚ç‚ê‚È‚¢‚Ì‚ÅŒ»Ý‚ɐݒè
615- LastModified := Now;
636+ Size := Size + Length( downResult.Text );
637+ // CGI ‚©‚ç‚͐³‚µ‚¢“ú•t‚ª“¾‚ç‚ê‚È‚¢‚Ì‚ÅŒ»Ý‚ɐݒè
638+ LastModified := Now;
616639
617640
618641
619- NewReceive := Count + 1;
620- Count := Count + downResult.Count;
621- NewResCount := downResult.Count;
642+ NewReceive := Count + 1;
643+ Count := Count + downResult.Count;
644+ NewResCount := downResult.Count;
622645
623646
624647
625- end else begin
626- Result := dsNotModify;
648+ end else begin
649+ Result := dsNotModify;
650+ end;
651+ finally
652+ downResult.Free;
627653 end;
628- finally
629- downResult.Free;
630- end;
631- end else if responseCode = 302 then begin
632- //http://jbbs.shitaraba.com/bbs/read.cgi/game/3477/1077473358/
633- //http://jbbs.shitaraba.com/game/bbs/read.cgi?BBS=3477&KEY=1077473358
634- //http://jbbs.shitaraba.com/game/3477/storage/1077473358.html
635- //‰ß‹ŽƒƒO
636- //tmpURL := URL;
637- if Assigned( InternalPrint ) then
638- InternalPrint( '‰ß‹ŽƒƒO‘qŒÉ“ü‚è' );
639- uri := TIdURI.Create( ReadURL );
640- uriList := TStringList.Create;
641- try
642- ExtractHttpFields( ['/', '?'], [], uri.Path, uriList );
643- tmpURL := uri.Protocol + '://' + uri.Host +
644- '/' + uriList[3] + '/' + uriList[4] + '/storage/' + uriList[ 5 ] + '.html';
645- finally
646- uriList.Free;
654+ end else if responseCode = 302 then begin
655+ //http://jbbs.shitaraba.com/bbs/read.cgi/game/3477/1077473358/
656+ //http://jbbs.shitaraba.com/game/bbs/read.cgi?BBS=3477&KEY=1077473358
657+ //http://jbbs.shitaraba.com/game/3477/storage/1077473358.html
658+ //‰ß‹ŽƒƒO
659+ tmpURL := URL;
660+ uri := TIdURI.Create( ReadURL );
661+ uriList := TStringList.Create;
662+ try
663+ ExtractHttpFields( ['/', '?'], [], uri.Path, uriList );
664+ URL := uri.Protocol + '://' + uri.Host +
665+ '/' + uriList[3] + '/' + uriList[4] + '/storage/' + uriList[ 5 ] + '.html';
666+ finally
667+ uriList.Free;
668+ uri.Free;
669+ end;
670+ uri := TIdURI.Create( ReadURL );
671+ Result := StorageDownload(uri.Path, uri.Document);
647672 uri.Free;
673+ URL := tmpURL;
674+ end else if responseCode = 304 then begin
675+ Result := dsNotModify;
648676 end;
649- Result := StorageDownload(tmpURL);
650- end else if responseCode = 304 then begin
651- Result := dsNotModify;
677+ finally
678+ DisposeResultString( tmp );
652679 end;
653- finally
654- DisposeResultString( tmp );
655680 end;
656681
657682 end;
@@ -691,16 +716,17 @@ end;
691716 // ‰ß‹ŽƒƒO—pDownloadŠÖ”
692717 // *************************************************************************
693718 function TShitarabaThreadItem.StorageDownload(
694- AURL : string
719+ Path, Document : string
695720 ) : TDownloadState;
696721 var
697722 modified : Double;
698723 tmp : PChar;
699- uri : TIdURI;
700- uriList : TStringList;
701724 downResult : TStringList;
702725 responseCode : Longint;
703726 logStream : TFileStream;
727+ //uri : TIdURI;
728+ //uriList : TStringList;
729+ datURL : string;
704730 tmpText, tmpLine, tmpTitle: string;
705731 tmpHTML: TStringList;
706732
@@ -709,24 +735,23 @@ var
709735 begin
710736
711737 Result := dsError;
712- uri := TIdURI.Create( ReadURL );
713- uriList := TStringList.Create;
738+
739+ //uri := TIdURI.Create( ReadURL );
714740 try
715- ExtractHttpFields( ['/', '?'], [], uri.Path, uriList );
716- FileName := uriList[ 5 ] + '.dat';
717- // http://jbbs.livedoor.com/bbs/rawmode.cgi/game/1578/1067968274/l100
718- // protocol://host/1/2/3/4/5/uriList.Count - 1
741+ FileName := Copy(Document, 1, Length(Document) - 5) + '.dat';
719742 if MyLogFolder = '' then begin
720743 // ‚Ç‚±‚É•Û‘¶‚µ‚Ä‚¢‚¢‚Ì‚©•ª‚©‚ç‚È‚¢‚̂ňꎞƒtƒ@ƒCƒ‹‚É•Û‘¶
721744 FilePath := TemporaryFile;
722745 FIsTemporary := True;
723746 end else begin
724- FilePath := MyLogFolder + uriList[ 3 ] + '\' + uriList[ 4 ] + '\' + uriList[ 5 ] + '.dat';
747+ FilePath := MyLogFolder
748+ + CustomStringReplace(CustomStringReplace(Path, '/storage', ''), '/', '\')
749+ + FileName;
750+
725751 FIsTemporary := False;
726752 end;
727753 finally
728- uri.Free;
729- uriList.Free;
754+ //uri.Free;
730755 end;
731756
732757 // •Û‘¶—p‚̃fƒBƒŒƒNƒgƒŠ‚ðŒ@‚é
@@ -738,7 +763,8 @@ begin
738763 // InternalDownload ‚É”C‚¹‚邱‚Æ‚ªo—ˆ‚é
739764 modified := LastModified;
740765
741- responseCode := InternalDownload( PChar( AURL ), modified, tmp, 0 );
766+ datURL := ReadURL;
767+ responseCode := InternalDownload( PChar( datURL ), modified, tmp, 0 );
742768
743769 try
744770 if (responseCode = 200) or (responseCode = 206) then begin
@@ -1163,12 +1189,19 @@ begin
11631189 if (tmphost = BBS_HOST_OLD) or (tmphost = BBS_HOST_OLD2) then
11641190 tmphost := BBS_HOST;
11651191
1166- FileName := uriList[ 5 ] + '.dat';
1167- // http://jbbs.livedoor.com/bbs/read.cgi/computer/351/1090404452/l100
1168- // http://jbbs.livedoor.com/bbs/read.cgi/game/1578/1067968274/l100
1169- // http://jbbs.livedoor.com/game/1000/subject.txt
1170- Result := CreateResultString(
1171- uri.Protocol + '://' + tmphost + '/' + uriList[ 3 ] + '/' + uriList[ 4 ] + '/' );
1192+ if( AnsiPos('.html', uri.Document) = 0 ) then begin //’ʏí
1193+ FileName := uriList[ 5 ] + '.dat';
1194+ // http://jbbs.livedoor.com/bbs/read.cgi/computer/351/1090404452/l100
1195+ // http://jbbs.livedoor.com/bbs/read.cgi/game/1578/1067968274/l100
1196+ // http://jbbs.livedoor.com/game/1000/subject.txt
1197+ Result := CreateResultString(
1198+ uri.Protocol + '://' + tmphost + '/' + uriList[ 3 ] + '/' + uriList[ 4 ] + '/' );
1199+ end else begin
1200+ //http://jbbs.livedoor.com/game/1578/storage/1086710948.html
1201+ Result := CreateResultString(
1202+ uri.Protocol + '://' + tmphost + CustomStringReplace(uri.Path, '/storage', ''));
1203+ end;
1204+
11721205 finally
11731206 uri.Free;
11741207 uriList.Free;
@@ -1265,8 +1298,7 @@ begin
12651298 end else if AnsiPos(THREAD_MARK, URL) = 0 then begin
12661299 //ƒRƒR‚ʼnߋŽƒƒO‚©‚Ç‚¤‚©ƒ`ƒFƒbƒNH
12671300 if(AnsiPos('.html/', uri.Path) > 0) then begin
1268- Result := uri.Protocol + '://' + tmphost + THREAD_MARK +
1269- CustomStringReplace(CustomStringReplace(uri.Path, '/storage', ''), '.html/', '/') + 'l100';
1301+ Result := uri.Protocol + '://' + tmphost + Copy(uri.Path, 1, Length(uri.Path) - 1);
12701302 end else
12711303 Result := URL;
12721304 end;
@@ -1334,6 +1366,12 @@ begin
13341366 Result :=
13351367 uri.Protocol + '://' + tmphost + '/bbs/rawmode.cgi/' +
13361368 uriList[ 3 ] + '/' + uriList[ 4 ] + '/' + uriList[ 5 ] + '/';
1369+ end else if AnsiPos(THREAD_MARK, URL) = 0 then begin
1370+ //ƒRƒR‚ʼnߋŽƒƒO‚©‚Ç‚¤‚©ƒ`ƒFƒbƒNH
1371+ if(AnsiPos('.html/', uri.Path) > 0) then begin
1372+ Result := uri.Protocol + '://' + tmphost + Copy(uri.Path, 1, Length(uri.Path) - 1);
1373+ end else
1374+ Result := URL;
13371375 end;
13381376 finally
13391377 uri.Free;