1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00
This commit is contained in:
gnosygnu
2016-01-03 21:27:38 -05:00
parent 9509363f46
commit 096045614c
647 changed files with 11693 additions and 7648 deletions

View File

@@ -33,6 +33,12 @@ public class Xof_file_wkr implements Gfo_thread_wkr {
public String Name() {return "xowa.load_imgs";}
public boolean Resume() {return true;}
public void Exec() {
int len = imgs.Count();
for (int i = 0; i < len; ++i)
Exec_by_fsdb((Xof_fsdb_itm)imgs.Get_at(i));
Xoa_app_.Usr_dlg().Prog_none("", "", "");
}
public void Exec_old() {
int len = imgs.Count();
for (int i = 0; i < len; ++i)
Ctor_by_hdump(hpg, (Xohd_img_itm__base)imgs.Get_at(i));
@@ -42,6 +48,9 @@ public class Xof_file_wkr implements Gfo_thread_wkr {
Xof_fsdb_itm fsdb = new Xof_fsdb_itm();
fsdb.Init_at_lnki(Xof_exec_tid.Tid_wiki_page, hpg.Wiki().Domain_itm().Abrv_xo(), hdump.Lnki_ttl(), hdump.Lnki_type(), hdump.Lnki_upright(), hdump.Lnki_w(), hdump.Lnki_h(), hdump.Lnki_time(), hdump.Lnki_page(), Xof_patch_upright_tid_.Tid_all);
fsdb.Init_at_hdoc(hdump.Html_uid(), hdump.Html_elem_tid());
Exec_by_fsdb(fsdb);
}
private void Exec_by_fsdb(Xof_fsdb_itm fsdb) {
fsdb.Orig_exists_n_();
Xof_orig_itm orig = orig_mgr.Find_by_ttl_or_null(fsdb.Lnki_ttl()); if (orig == Xof_orig_itm.Null) return;
Eval_orig(orig, fsdb, url_bldr, repo_mgr, img_size);

View File

@@ -89,6 +89,10 @@ public class Xow_file_mgr implements GfoInvkAble {
return fsdb_mgr.Mnt_mgr().Mnts__get_main().Cfg_mgr().Grps_get_or_load(grp);
}
public Xof_fsdb_mgr Fsdb_mgr() {return fsdb_mgr;} private Xof_fsdb_mgr fsdb_mgr = new Xof_fsdb_mgr__sql();
public void Clear_for_tests() { // NOTE: must clear else fsdb_mode will be cached for multiple runs; will generally be v1, but some tests will set to v2; DATE:2015-12-22
version = Bool_.__byte;
fsdb_mode = null;
}
public boolean Find_meta(Xof_xfer_itm xfer_itm) {
xfer_itm.Orig_repo_id_(Xof_meta_itm.Repo_unknown);
byte[] xfer_itm_ttl = xfer_itm.Lnki_ttl();

View File

@@ -53,5 +53,5 @@ public class Js_img_mgr {
break;
}
}
public static String To_doc_uid(int html_uid) {return "xowa_file_img_" + Int_.To_str(html_uid);}
public static String To_doc_uid(int html_uid) {return gplx.xowa.htmls.Xoh_img_mgr.Str__html_uid + Int_.To_str(html_uid);}
}