1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00

Embeddable: Download interwiki map

This commit is contained in:
gnosygnu
2017-10-23 17:44:33 -04:00
parent ecc27daec8
commit dc22c15895
8 changed files with 27 additions and 9 deletions

View File

@@ -17,15 +17,15 @@ package gplx.xowa.files; import gplx.*; import gplx.xowa.*;
public class Xof_fsdb_mode {
private int tid;
Xof_fsdb_mode(int tid) {this.tid = tid;}
public boolean Tid__v2__bld() {return tid == TID__v2__bld;}
public void Tid__v2__bld__y_() {tid = TID__v2__bld;}
public void Tid__v2__mp__y_() {tid = TID__v2__mp;}
public boolean Tid__bld() {return tid > TID__v2__gui;}
public boolean Tid__v2__bld() {return tid == TID__v2__bld;}
public void Tid__v2__bld__y_() {tid = TID__v2__bld;}
public void Tid__v2__mp__y_() {tid = TID__v2__mp;}
public boolean Tid__bld() {return tid > TID__v2__gui;}
private static final int
TID__v0 = 1
, TID__v2__gui = 2
, TID__v2__bld = 3
, TID__v2__mp = 4
TID__v0 = 1
, TID__v2__gui = 2
, TID__v2__bld = 3
, TID__v2__mp = 4
;
public static Xof_fsdb_mode New__v0() {return new Xof_fsdb_mode(TID__v0);}
public static Xof_fsdb_mode New__v2__gui() {return new Xof_fsdb_mode(TID__v2__gui);}

View File

@@ -53,6 +53,7 @@ public class Xow_file_mgr implements Gfo_invk {
public boolean Version_2_y() {return this.Version() == Version_2;}
public void Version_1_y_() {version = Version_1;} // TEST:
public void Version_2_y_() {version = Version_2; fsdb_mode = Xof_fsdb_mode.New__v2__gui();} // TEST:
public void Fsdb_mgr_(Xof_fsdb_mgr fsdb_mgr) {
this.fsdb_mgr = fsdb_mgr;
version = Version_2;

View File

@@ -23,6 +23,11 @@ public class Xof_orig_mgr {
public Xof_orig_mgr() {this.Wkrs__clear();}
public void Init_by_wiki(Xow_wiki wiki, Xof_fsdb_mode fsdb_mode, Xof_orig_tbl[] orig_tbls, Xof_url_bldr url_bldr) {
this.repo_mgr = wiki.File__repo_mgr(); this.url_bldr = url_bldr;
// if embeddable, do not load orig wkrs which will download images DATE:2017-10-23
if (wiki.Embeddable_enabled())
return;
// if (!fsdb_mode.Tid_v0()) { // add view,make; don't add if wmf
int orig_tbls_len = orig_tbls.length;
for (int i = 0; i < orig_tbls_len; ++i) {