安定版
Revision | e7be2014aa808a7af2504c4cd994739c008c813c (tree) |
---|---|
Zeit | 2013-09-12 19:23:59 |
Autor | ![]() |
Commiter | akira001 |
release 2.3.6.4
deal with new 2chviewer protocol.
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices; | ||
32 | 32 | // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を |
33 | 33 | // 既定値にすることができます: |
34 | 34 | // [assembly: AssemblyVersion("1.0.*")] |
35 | -[assembly: AssemblyVersion("2.3.6.3")] | |
35 | +[assembly: AssemblyVersion("2.3.6.4")] | |
36 | 36 | [assembly: AssemblyFileVersion("2.3.6.0")] |
@@ -51,5 +51,5 @@ using System.Windows; | ||
51 | 51 | // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を |
52 | 52 | // 既定値にすることができます: |
53 | 53 | // [assembly: AssemblyVersion("1.0.*")] |
54 | -[assembly: AssemblyVersion("2.3.6.3")] | |
54 | +[assembly: AssemblyVersion("2.3.6.4")] | |
55 | 55 | [assembly: AssemblyFileVersion("2.3.6.2")] |
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices; | ||
32 | 32 | // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を |
33 | 33 | // 既定値にすることができます: |
34 | 34 | // [assembly: AssemblyVersion("1.0.*")] |
35 | -[assembly: AssemblyVersion("2.3.6.3")] | |
35 | +[assembly: AssemblyVersion("2.3.6.4")] | |
36 | 36 | [assembly: AssemblyFileVersion("2.3.6.0")] |
@@ -51,5 +51,5 @@ using System.Windows; | ||
51 | 51 | // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を |
52 | 52 | // 既定値にすることができます: |
53 | 53 | // [assembly: AssemblyVersion("1.0.*")] |
54 | -[assembly: AssemblyVersion("2.3.6.3")] | |
54 | +[assembly: AssemblyVersion("2.3.6.4")] | |
55 | 55 | [assembly: AssemblyFileVersion("2.3.6.0")] |
@@ -182,7 +182,14 @@ namespace NT2chView | ||
182 | 182 | NTThreadTitle tt = board.findThreadTitleByDatName( |
183 | 183 | threadDesc.getDatName()); |
184 | 184 | if (tt == null) |
185 | - return; | |
185 | + { | |
186 | + if (NTUserPreference.MaruIsEnabled) | |
187 | + { | |
188 | + tt = board.addExtraThread(threadDesc.getDatName(), null); | |
189 | + } | |
190 | + if (tt == null) | |
191 | + return; | |
192 | + } | |
186 | 193 | |
187 | 194 | NTAppState.getMainWindow().OpenNewThread(tt); |
188 | 195 | } |
@@ -294,6 +294,13 @@ namespace NT2chView | ||
294 | 294 | if (NTAppState.getMainWindow().OpenNewBoard(board)) |
295 | 295 | { |
296 | 296 | NTThreadTitle tt = board.findThreadTitleByDatName(mAddress); |
297 | + if (tt == null) | |
298 | + { | |
299 | + if (NTUserPreference.MaruIsEnabled) | |
300 | + { | |
301 | + tt = board.addExtraThread(mAddress, null); | |
302 | + } | |
303 | + } | |
297 | 304 | if (tt != null) |
298 | 305 | { |
299 | 306 | NTAppState.getMainWindow().OpenNewThread(tt); |
@@ -517,9 +517,15 @@ namespace NT2chView.NtNet | ||
517 | 517 | dat = NTHttpUtils.ridSuffixFromDatName(datName); |
518 | 518 | if (!NTHttpUtils.parseHostAddress(address, out host, out board)) |
519 | 519 | return false; |
520 | + string subDomain, parentDomain; | |
521 | + if (!NTHttpUtils.parseSubDomain(host, out subDomain, out parentDomain)) | |
522 | + return false; | |
520 | 523 | |
521 | - string url = NTHttpUtils.HTTP_PROTOCOL + host | |
522 | - + "/test/offlaw.cgi/" + board + "/" + dat + "/?raw=0.0&sid=" + sid; | |
524 | + string url = NTHttpUtils.HTTP_PROTOCOL + NTHttpUtils.KAKO_SITE + | |
525 | + parentDomain + NTHttpUtils.HTTP_SLASH + subDomain +NTHttpUtils.HTTP_SLASH + | |
526 | + board + "/" + dat + "/?raw=0.0&sid=" + sid; | |
527 | + //string url = NTHttpUtils.HTTP_PROTOCOL + host | |
528 | + // + "/test/offlaw.cgi/" + board + "/" + dat + "/?raw=0.0&sid=" + sid; | |
523 | 529 | |
524 | 530 | NTHttpGetClient httpClient = new NTHttpGetClient(url); |
525 | 531 |
@@ -13,6 +13,7 @@ namespace NT2chView.NtNet | ||
13 | 13 | public const string HTTP_WRITE_CGI_PATH = @"/test/bbs.cgi"; |
14 | 14 | public const string HTTP_READ_CGI_PATH = @"/test/read.cgi/"; |
15 | 15 | public const string HTTP_SLASH = @"/"; |
16 | + public const string HTTP_DOT = "."; | |
16 | 17 | public const string DAT_SUFFIX = ".dat"; |
17 | 18 | public const string CGI_SUFFIX = ".cgi"; |
18 | 19 | public const string DEFAULT_SUBMIT = "書き込む"; |
@@ -20,6 +21,7 @@ namespace NT2chView.NtNet | ||
20 | 21 | public const string HOST_2CH = ".2ch.net"; |
21 | 22 | public const string MARU_HOST = "2chv.tora3.net"; |
22 | 23 | public const string MARU_LOGIN_PATH = "/futen.cgi"; |
24 | + public const string KAKO_SITE = "rokka."; | |
23 | 25 | public const string LOCAL_DAT_TITEL_PREFIX = "[DAT落]"; |
24 | 26 | |
25 | 27 |
@@ -144,6 +146,20 @@ namespace NT2chView.NtNet | ||
144 | 146 | return true; |
145 | 147 | } |
146 | 148 | |
149 | + public static bool parseSubDomain(string host, out string subDomain, out string parentDomain) | |
150 | + { | |
151 | + subDomain = null; | |
152 | + parentDomain = null; | |
153 | + if (host == null) | |
154 | + return false; | |
155 | + | |
156 | + int idx = host.IndexOf(HTTP_DOT); | |
157 | + if (idx < 0) | |
158 | + return false; | |
159 | + subDomain = host.Substring(0, idx); | |
160 | + parentDomain = host.Substring(idx + 1); | |
161 | + return true; | |
162 | + } | |
147 | 163 | public static bool parseHostAddress(string source, out string hostName, out string boardName) |
148 | 164 | { |
149 | 165 | hostName = string.Empty; |
@@ -51,5 +51,5 @@ using System.Windows; | ||
51 | 51 | // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を |
52 | 52 | // 既定値にすることができます: |
53 | 53 | // [assembly: AssemblyVersion("1.0.*")] |
54 | -[assembly: AssemblyVersion("2.3.6.3")] | |
55 | -[assembly: AssemblyFileVersion("2.3.6.3")] | |
54 | +[assembly: AssemblyVersion("2.3.6.4")] | |
55 | +[assembly: AssemblyFileVersion("2.3.6.4")] |