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

uca category support and other changes

This commit is contained in:
gnosygnu
2016-10-12 08:57:22 -04:00
parent e3b393650d
commit 3fc2e0741f
187 changed files with 3486 additions and 2984 deletions

View File

@@ -120,7 +120,7 @@ public class Xof_file_wkr implements Gfo_thread_wkr {
}
public static void Save_bin(Xof_fsdb_itm itm, Fsm_mnt_mgr mnt_mgr, Io_url html_url) {
long rdr_len = Io_mgr.Instance.QueryFil(html_url).Size();
Io_stream_rdr rdr = gplx.core.ios.streams.Io_stream_rdr_.file_(html_url);
Io_stream_rdr rdr = gplx.core.ios.streams.Io_stream_rdr_.New__raw(html_url);
try {
rdr.Open();
Fsm_mnt_itm mnt_itm = mnt_mgr.Mnts__get_insert();

View File

@@ -23,6 +23,6 @@ public class Io_download_mgr__memory implements Io_download_mgr {
public void Upload_data(String url, byte[] data) {hash.Add(url, data);}
public Io_stream_rdr Download_as_rdr(String url) {
byte[] data = (byte[])hash.Get_by(url); if (data == null) return Io_stream_rdr_.Noop;
return Io_stream_rdr_.mem_(data);
return Io_stream_rdr_.New__mem(data);
}
}

View File

@@ -110,7 +110,7 @@ public class Xof_bin_mgr {
boolean resized = Resize(exec_tid, fsdb, file_is_orig, orig, trg);
if (!resized) continue;
fsdb.File_exists_y_();
rv = Io_stream_rdr_.file_(trg); // return stream of resized url; (result of imageMagick / inkscape)
rv = Io_stream_rdr_.New__raw(trg); // return stream of resized url; (result of imageMagick / inkscape)
rv.Open();
return rv;
}
@@ -151,7 +151,7 @@ public class Xof_bin_mgr {
if (save_to_fsys) { // noop; already saved to trg
}
else {
Io_stream_rdr rdr = Io_stream_rdr_.file_(trg); // return stream of resized url; (result of imageMagick / inkscape)
Io_stream_rdr rdr = Io_stream_rdr_.New__raw(trg); // return stream of resized url; (result of imageMagick / inkscape)
rdr.Open();
rdr_wrapper.Rdr_(rdr);
}

View File

@@ -25,7 +25,7 @@ public abstract class Xof_bin_wkr__fsys_base implements Xof_bin_wkr, Gfo_invk {
public boolean Resize_allowed() {return resize_allowed;} public void Resize_allowed_(boolean v) {resize_allowed = v;} private boolean resize_allowed = false;
public Io_stream_rdr Get_as_rdr(Xof_fsdb_itm itm, boolean is_thumb, int w) {
Io_url src_url = this.Get_src_url(Xof_img_mode_.By_bool(is_thumb), String_.new_u8(itm.Orig_repo_name()), itm.Orig_ttl(), itm.Orig_ttl_md5(), itm.Orig_ext(), w, itm.Lnki_time(), itm.Lnki_page());
return (src_url == Io_url_.Empty) ? gplx.core.ios.streams.Io_stream_rdr_.Noop : gplx.core.ios.streams.Io_stream_rdr_.file_(src_url);
return (src_url == Io_url_.Empty) ? gplx.core.ios.streams.Io_stream_rdr_.Noop : gplx.core.ios.streams.Io_stream_rdr_.New__raw(src_url);
}
public boolean Get_to_fsys(Xof_fsdb_itm itm, boolean is_thumb, int w, Io_url bin_url) {
return Get_to_fsys(itm.Orig_repo_name(), itm.Orig_ttl(), itm.Orig_ttl_md5(), itm.Orig_ext(), is_thumb, w, itm.Lnki_time(), itm.Lnki_page(), bin_url);

View File

@@ -59,9 +59,9 @@ class Xof_file_fxt {
Fsm_atr_fil atr_fil = mnt_itm.Atr_mgr().Db__core();
Fsm_bin_fil bin_fil = mnt_itm.Bin_mgr().Dbs__get_nth();
if (arg.Is_thumb())
mnt_itm.Insert_thm(tmp_thm, atr_fil, bin_fil, arg.Wiki(), arg.Ttl(), arg.Ext(), arg.W(), arg.H(), arg.Time(), arg.Page(), arg.Bin().length, gplx.core.ios.streams.Io_stream_rdr_.mem_(arg.Bin()));
mnt_itm.Insert_thm(tmp_thm, atr_fil, bin_fil, arg.Wiki(), arg.Ttl(), arg.Ext(), arg.W(), arg.H(), arg.Time(), arg.Page(), arg.Bin().length, gplx.core.ios.streams.Io_stream_rdr_.New__mem(arg.Bin()));
else
mnt_itm.Insert_img(atr_fil, bin_fil, arg.Wiki(), arg.Ttl(), arg.Ext(), arg.W(), arg.H(), arg.Bin().length, gplx.core.ios.streams.Io_stream_rdr_.mem_(arg.Bin()));
mnt_itm.Insert_img(atr_fil, bin_fil, arg.Wiki(), arg.Ttl(), arg.Ext(), arg.W(), arg.H(), arg.Bin().length, gplx.core.ios.streams.Io_stream_rdr_.New__mem(arg.Bin()));
}
public void Exec_get(Xof_exec_arg arg) {
byte[] ttl_bry = arg.Ttl();