mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v2.7.3.3
This commit is contained in:
@@ -84,11 +84,13 @@ public class Xob_dump_file {
|
||||
}
|
||||
private boolean Connect_exec(IoEngine_xrg_downloadFil args, String cur_file_url) {
|
||||
boolean rv = args.Src_last_modified_query_(true).Exec_meta(cur_file_url);
|
||||
Xoa_app_.Usr_dlg().Note_many("", "", "wmf.dump:connect log; url=~{0} result=~{1} fil_len=~{2} file_modified=~{3} server_url=~{4} dump_date=~{5}", cur_file_url, rv, args.Src_content_length(), args.Src_last_modified() == null ? "<<NULL>>" : args.Src_last_modified().XtoStr_fmt_yyyy_MM_dd_HH_mm_ss(), server_url, dump_date);
|
||||
long tmp_file_len = args.Src_content_length();
|
||||
DateAdp tmp_file_modified = args.Src_last_modified();
|
||||
Xoa_app_.Usr_dlg().Note_many("", "", "wmf.dump:connect rslts; url=~{0} result=~{1} fil_len=~{2} file_modified=~{3} server_url=~{4} dump_date=~{5}", cur_file_url, rv, tmp_file_len, tmp_file_modified == null ? "<<NULL>>" : tmp_file_modified.XtoStr_fmt_yyyy_MM_dd_HH_mm_ss(), server_url, dump_date);
|
||||
if (rv) {
|
||||
file_len = args.Src_content_length();
|
||||
file_modified = args.Src_last_modified();
|
||||
if (file_modified.Timestamp_unix() <= 0) return false; // dump is available, but invalid (stamped with old date)
|
||||
if (tmp_file_modified != null && tmp_file_modified.Year() <= 1970) return false; // url has invalid file; note that dumps.wikimedia.org currently returns back an HTML page with "404 not found"; rather than try to download and parse this (since content may change), use the date_modified which always appears to be UnixTime 0; DATE:2015-07-21
|
||||
file_len = tmp_file_len;
|
||||
file_modified = tmp_file_modified;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ public class Xob_dump_file_ {
|
||||
|| String_.Eq(dump_server, Xob_dump_file_.Server_masaryk)
|
||||
)
|
||||
){
|
||||
Xoa_app_.Usr_dlg().Note_many("", "", "wmf.dump:connect log; server_url=~{0} dump_date=~{1}", dump_server, dump_date);
|
||||
Xoa_app_.Usr_dlg().Note_many("", "", "wmf.dump:dump date; server_url=~{0} dump_date=~{1}", dump_server, dump_date);
|
||||
Xoi_mirror_parser mirror_parser = new Xoi_mirror_parser();
|
||||
String dump_wiki_url = dump_server + String_.new_a7(rv.Wiki_alias()) + "/";
|
||||
byte[] dump_url_wiki_html = gplx.ios.IoEngine_xrg_downloadFil.new_("", Io_url_.Empty).Exec_as_bry(dump_wiki_url); if (Bry_.Len_eq_0(dump_url_wiki_html)) return;
|
||||
|
||||
Reference in New Issue
Block a user