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

Bldr: Add basic implementation of orig_regy.find_missing

This commit is contained in:
gnosygnu
2017-01-08 11:29:03 -05:00
parent 4bcefa2621
commit 006c14db4e
3 changed files with 95 additions and 0 deletions

View File

@@ -28,9 +28,13 @@ public class Xof_orig_wkr__wmf_api implements Xof_orig_wkr {
public void Find_by_list(Ordered_hash rv, List_adp itms) {Xof_orig_wkr_.Find_by_list(this, rv, itms);}
public Xof_orig_itm Find_as_itm(byte[] ttl, int list_idx, int list_len) {
if (!gplx.core.ios.IoEngine_system.Web_access_enabled) return Xof_orig_itm.Null; // don't check api if download disabled, else prog messages; DATE:2015-06-17
// make call to api
Xoa_app_.Usr_dlg().Prog_none("", "", Prog_msg(list_idx, list_len, ttl));
boolean found = orig_api.Api_query_size(api_rv, download_wkr, repo_mgr, ttl, Xof_img_size.Null, Xof_img_size.Null); // pass in null size to look for orig; DATE:2015-02-10
if (!found) return Xof_orig_itm.Null; // ttl not found by api; return
// deserialize values and return
byte api_repo = Bry_.Eq(api_rv.Orig_wiki(), wiki_domain) ? Xof_orig_itm.Repo_wiki : Xof_orig_itm.Repo_comm;
byte[] api_page = api_rv.Orig_page();
int api_w = api_rv.Orig_w(), api_h = api_rv.Orig_h();