@yuneta/gobj-js 7.13.2 → 7.13.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -718,7 +718,7 @@ function Re(e) {
718
718
  }
719
719
  Y(e) && $(t("⏯ ⏯ play: %s", Ge(e))), e.playing = !0;
720
720
  let n = 0;
721
- return e.gclass.gmt.mt_play && (n = e.gclass.gmt.mt_play(e), n < 0 && (e.playing = !1)), n;
721
+ return e.gclass.gmt.mt_play && (n = e.gclass.gmt.mt_play(e), (n < 0 || !1 === n) && (e.playing = !1)), n;
722
722
  }
723
723
  function we(e) {
724
724
  return Ke(e) ? (Yt("gobj NULL or DESTROYED"), -1) : e.playing ? (Y(e) && $(t("⏸ ⏸ pause: %s", Ge(e))), e.playing = !1, e.gclass.gmt.mt_pause ? e.gclass.gmt.mt_pause(e) : 0) : (Yt(`${Fe(e)}: GObj NOT PLAYING`), -1);
@@ -1098,7 +1098,12 @@ function wt(e, n, r, o) {
1098
1098
  }
1099
1099
  return on(o, "subs_flag", s), o;
1100
1100
  }(e, n, r, o);
1101
- return l ? (sn(e.dl_subscriptions, l), sn(o.dl_subscribings, l), d && st(d, "trace_subscriptions") && ($(t("💜💜👍 subscribing event '%s', publisher '%s', subscriber %s", n || "", Fe(e), Fe(o))), r && Ht(r)), e.gclass.gmt.mt_subscription_added && e.gclass.gmt.mt_subscription_added(e, l) < 0 && (Rt(e, l, !0, !0), l = 0), l) : (Yt(`${Fe(e)}: _create_subscription() FAILED`), 0);
1101
+ if (!l) return Yt(`${Fe(e)}: _create_subscription() FAILED`), 0;
1102
+ if (sn(e.dl_subscriptions, l), sn(o.dl_subscribings, l), d && st(d, "trace_subscriptions") && ($(t("💜💜👍 subscribing event '%s', publisher '%s', subscriber %s", n || "", Fe(e), Fe(o))), r && Ht(r)), e.gclass.gmt.mt_subscription_added) {
1103
+ let t = e.gclass.gmt.mt_subscription_added(e, l);
1104
+ (t < 0 || !1 === t) && (Rt(e, l, !0, !0), l = 0);
1105
+ }
1106
+ return l;
1102
1107
  }
1103
1108
  function Dt(e, t, n) {
1104
1109
  let r = [...t];
@@ -1127,7 +1132,7 @@ function kt(e, n, r) {
1127
1132
  if (e.gclass.gmt.mt_publication_pre_filter) {
1128
1133
  let t = e.gclass.gmt.mt_publication_pre_filter(e, a, n, r);
1129
1134
  if (t < 0) break;
1130
- if (0 === t) continue;
1135
+ if (!t) continue;
1131
1136
  }
1132
1137
  let u = kn(e, a, "subscriber", null, It.KW_REQUIRED);
1133
1138
  if (!u || Ke(u)) continue;
@@ -1135,8 +1140,8 @@ function kt(e, n, r) {
1135
1140
  if (hn(f) || 0 === jn(f, n)) {
1136
1141
  In(e, a, "__config__", null, 0);
1137
1142
  let o = In(e, a, "__global__", null, 0), i = In(e, a, "__local__", null, 0), f = $n(e, a, "__filter__", null, 0), g = r, p = 1;
1138
- if (e.gclass.gmt.mt_publication_filter ? p = e.gclass.gmt.mt_publication_filter(e, n, g, u) : cn(f) > 0 && (p = Un(g, f), s && ($(t("💜💜🔄%s publishing with filter, event '%s', subscriber'%s', publisher %s", p ? "👍" : "👎", n || "", Fe(u), Fe(e))), Ht(f))), p < 0) break;
1139
- if (0 === p) continue;
1143
+ if (e.gclass.gmt.mt_publication_filter ? p = e.gclass.gmt.mt_publication_filter(e, n, g, u) : cn(f) > 0 && (p = Un(g, f) ? 1 : 0, s && ($(t("💜💜🔄%s publishing with filter, event '%s', subscriber'%s', publisher %s", p ? "👍" : "👎", n || "", Fe(u), Fe(e))), Ht(f))), p < 0) break;
1144
+ if (!p) continue;
1140
1145
  let d = dt(u, n, !0);
1141
1146
  if (d && d.event_flag & w.EVF_SYSTEM_EVENT && !bt(u, d.event_name, 0)) continue;
1142
1147
  i && On(g, i), o && Xt(g, o), s && ($(t("🔝🔄 mach(%s%s), st: %s, ev: %s, from(%s%s)", u.running ? "" : "!!", Fe(u), pt(u), n || "", e && !e.running ? "!!" : "", Fe(e))), Ht(g));