From 122b0a3ea23874eee4c8fd26108b8e64c275a364 Mon Sep 17 00:00:00 2001 From: zako Date: Tue, 24 Jun 2014 19:04:59 +0900 Subject: [PATCH] =?utf8?q?offlaw2=E3=81=A7=E5=8F=96=E5=BE=97=E3=81=97?= =?utf8?q?=E3=81=9F=E3=82=B9=E3=83=AC=E3=83=83=E3=83=89=E3=81=AE=E6=9C=80?= =?utf8?q?=E7=B5=82=E6=9B=B4=E6=96=B0=E6=97=A5=E6=99=82=E3=81=AB=E6=9C=80?= =?utf8?q?=E7=B5=82=E3=83=AC=E3=82=B9=E6=97=A5=E6=99=82=E3=82=92=E8=A8=AD?= =?utf8?q?=E5=AE=9A=20=E3=82=AA=E3=83=97=E3=82=B7=E3=83=A7=E3=83=B3?= =?utf8?q?=E7=94=BB=E9=9D=A2=E3=81=AE=E3=80=8C=E3=83=A6=E3=83=BC=E3=82=B6I?= =?utf8?q?D=E3=81=AE=E5=8F=96=E5=BE=97=E3=80=8D=E3=81=AE=E3=83=AA=E3=83=B3?= =?utf8?q?=E3=82=AF=E5=85=88=E3=82=92=E6=B5=AA=E4=BA=BA=E3=83=9A=E3=83=BC?= =?utf8?q?=E3=82=B8=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- ItemDownload.pas | 47 +++++++++++++++++++++++++++++++++++++++++++++++ Option.dfm | 6 +++--- Option.pas | 3 ++- gikoNavi.res | Bin 4316 -> 4316 bytes 4 files changed, 52 insertions(+), 4 deletions(-) diff --git a/ItemDownload.pas b/ItemDownload.pas index 80d8c01..b49e13d 100644 --- a/ItemDownload.pas +++ b/ItemDownload.pas @@ -71,6 +71,7 @@ type procedure FireWork; procedure FireWorkBegin; procedure FireWorkEnd; + procedure GetLastModified; protected procedure Execute; override; public @@ -550,6 +551,8 @@ begin Item.ResponseCode := 404; Item.State := gdsError; Item.ErrText := 'ƒXƒŒ‚Í‘¶Ý‚µ‚È‚¢‚悤‚Å‚·B' + Item.Content; + end else begin + GetLastModified; end; end else begin {$IFDEF DEBUG} @@ -1600,4 +1603,48 @@ begin end; end; +procedure TDownloadThread.GetLastModified; +var + ResultDate: TDateTime; + ResList: TStringList; + LastRes: String; + KwPos: Integer; + ResRow: Integer; + DTIdx: Integer; + Ok: Boolean; +begin + Ok := False; + ResultDate := Item.LastModified; + ResList := TStringList.Create; + try + ResList.Text := Item.Content; + for ResRow := ResList.Count - 1 downto 0 do begin + if (ResRow > 999) then + continue; + LastRes := ResList.Strings[ResRow]; + KwPos := Pos('<>', LastRes); + if (KwPos < 1) then + continue; + Delete(LastRes, 1, KwPos + 1); + KwPos := Pos('<>', LastRes); + if (KwPos < 1) then + continue; + Delete(LastRes, 1, KwPos + 1); + // '2013/04/22(ŒŽ) 02:32:36' + SetLength(LastRes, 23); + Delete(LastRes, 11, 4); // —j“úíœ + try + ResultDate := StrToDateTime(LastRes); + Ok := True; + except + end; + if (Ok = True) then + break; + end; + finally + ResList.Free; + end; + Item.LastModified :=ResultDate; +end; + end. diff --git a/Option.dfm b/Option.dfm index 588df2d..44cad90 100644 --- a/Option.dfm +++ b/Option.dfm @@ -251,7 +251,7 @@ object OptionDialog: TOptionDialog Top = 43 Width = 417 Height = 20 - ItemHeight = 0 + ItemHeight = 12 TabOrder = 0 Text = 'BoardURLComboBox' end @@ -1585,9 +1585,9 @@ object OptionDialog: TOptionDialog object Tora3URLLabel: TLabel Left = 329 Top = 126 - Width = 104 + Width = 129 Height = 12 - Caption = 'http://2ch.tora3.net/' + Caption = 'http://ronin.bbspink.com/' Font.Charset = SHIFTJIS_CHARSET Font.Color = clBlue Font.Height = -12 diff --git a/Option.pas b/Option.pas index 9216ac4..280fc69 100644 --- a/Option.pas +++ b/Option.pas @@ -321,7 +321,8 @@ const DEFAULT_FONT_SIZE: Integer = 9; DEFAULT_TABFONT_NAME: string = '‚l‚r ‚oƒSƒVƒbƒN'; DEFAULT_TABFONT_SIZE: Integer = 9; - URL_TORA3: WideString = 'http://2ch.tora3.net/'; +// URL_TORA3: WideString = 'http://2ch.tora3.net/'; + URL_TORA3: WideString = 'http://ronin.bbspink.com/'; DEFAULT_CSS_FILENAME = 'default.css'; {$R *.DFM} diff --git a/gikoNavi.res b/gikoNavi.res index 8bb34143804cca57677e4786c538384efe34a59b..4abbd9677bdb1b2a8078244e3a18867338ffe89c 100644 GIT binary patch delta 46 vcmcbkct>%=3toOF21W)eW(Ec*J^4HDZ(cJ7Jq80HwqP(~Fx&i}?=B+%5kCt~ delta 46 vcmcbkct>%=3toOl21W);W<~}mJ^4HDZ(dUdJqAM{wqP(~Fx~v0?=B+%5bX;~ -- 2.11.0