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
2015-04-05 21:00:31 -04:00
parent 80b9928b5c
commit 18dcd3f89e
615 changed files with 9826 additions and 8619 deletions

View File

@@ -61,7 +61,7 @@ public class Xof_xfer_mgr {
// BLOCK: thumb
if (lnki_thumbable) { // lnki is thumb with known width >>> try to do thumb
if (lnki_w < 1 && lnki_h < 1) { // NOTE: only give default thumb if both w and h are < 1; if h > 0, then skip; EX:Paris;[[File:IMA-Ile-St-Louis.jpg|thumb|x220]]
wiki.File_mgr().Fsdb_mgr().Init_by_wiki(wiki);
wiki.File_mgr().Init_file_mgr_by_load(wiki);
lnki_w = Xof_img_size.Upright_calc(wiki.File_mgr().Patch_upright(), lnki_upright, lnki_w, lnki_w, lnki_h, lnki_type);
if (lnki_w < 1)
lnki_w = wiki.Html_mgr().Img_thumb_width(); // NOTE: used to be src_repo.Thumb_w()

View File

@@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa; import gplx.*;
import gplx.core.primitives.*;
import gplx.xowa.files.*; import gplx.xowa.files.fsdb.*; import gplx.xowa.files.bins.*;
import gplx.xowa.files.*; import gplx.xowa.files.fsdb.*; import gplx.xowa.files.bins.*; import gplx.xowa.files.origs.*;
import gplx.xowa.files.gui.*;
public class Xof_xfer_queue {
private final ListAdp xfer_list = ListAdp_.new_(); private final OrderedHash dirty_meta_mgrs = OrderedHash_.new_bry_();
@@ -62,10 +62,10 @@ public class Xof_xfer_queue {
this.Clear();
}
private void Exec_v2(byte exec_tid, Gfo_usr_dlg wtr, Xowe_wiki wiki, Xoae_page page) {
wiki.File_mgr().Fsdb_mgr().Init_by_wiki(wiki);
wiki.File_mgr().Fsdb_mgr().Fsdb_search_by_list(exec_tid, Xfer_itms_to_fsdb_itms(xfer_list, wiki.File_mgr().Patch_upright()), page, page.Tab().Html_itm());
wiki.File_mgr().Init_file_mgr_by_load(wiki);
wiki.File_mgr().Fsdb_mgr().Fsdb_search_by_list(exec_tid, Xfer_itms_to_fsdb_itms(wiki, xfer_list, wiki.File_mgr().Patch_upright()), page, page.Tab().Html_itm());
}
private ListAdp Xfer_itms_to_fsdb_itms(ListAdp xfer_list, int upright_patch) {
private ListAdp Xfer_itms_to_fsdb_itms(Xowe_wiki wiki, ListAdp xfer_list, int upright_patch) {
ListAdp rv = ListAdp_.new_();
int list_len = xfer_list.Count();
for (int i = 0; i < list_len; i++) {
@@ -75,6 +75,11 @@ public class Xof_xfer_queue {
fsdb.Lnki_ext_(xfer.Lnki_ext());
if (xfer.Orig_ext() > 0)
fsdb.Ctor_by_orig(xfer.Orig_repo_id(), xfer.Orig_repo_name(), xfer.Orig_ttl(), xfer.Orig_ext(), xfer.Orig_w(), xfer.Orig_h(), xfer.Orig_redirect());
else { // NOTE: orig_ext doesn't exist; try to get again, b/c Xof_file_wkr won't get it; DATE:2015-04-05
Xof_orig_itm orig = wiki.File_mgr().Orig_mgr().Find_by_ttl_or_null(xfer.Lnki_ttl());
gplx.xowa.files.repos.Xof_repo_pair repo_pair = wiki.File_mgr__repo_mgr().Repos_get_by_id(orig.Repo());
fsdb.Ctor_by_orig(orig.Repo(), repo_pair.Trg().Wiki_key(), orig.Page(), orig.Ext(), orig.W(), orig.H(), orig.Redirect());
}
fsdb.Html_uid_(xfer.Html_uid());
fsdb.Html_elem_tid_(xfer.Html_elem_tid());
fsdb.Gallery_mgr_h_(xfer.Gallery_mgr_h());