@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.
@@ -721,7 +721,7 @@
721
721
  }
722
722
  B(e) && L(n("⏯ ⏯ play: %s", Me(e))), e.playing = !0;
723
723
  let t = 0;
724
- return e.gclass.gmt.mt_play && (t = e.gclass.gmt.mt_play(e), t < 0 && (e.playing = !1)), t;
724
+ return e.gclass.gmt.mt_play && (t = e.gclass.gmt.mt_play(e), (t < 0 || !1 === t) && (e.playing = !1)), t;
725
725
  }
726
726
  function De(e) {
727
727
  return Ye(e) ? (Bt("gobj NULL or DESTROYED"), -1) : e.playing ? (B(e) && L(n("⏸ ⏸ pause: %s", Me(e))), e.playing = !1, e.gclass.gmt.mt_pause ? e.gclass.gmt.mt_pause(e) : 0) : (Bt(`${Ve(e)}: GObj NOT PLAYING`), -1);
@@ -1101,7 +1101,12 @@
1101
1101
  }
1102
1102
  return ln(o, "subs_flag", i), o;
1103
1103
  }(e, t, r, o);
1104
- return s ? (sn(e.dl_subscriptions, s), sn(o.dl_subscribings, s), p && lt(p, "trace_subscriptions") && (L(n("💜💜👍 subscribing event '%s', publisher '%s', subscriber %s", t || "", Ve(e), Ve(o))), r && zt(r)), e.gclass.gmt.mt_subscription_added && e.gclass.gmt.mt_subscription_added(e, s) < 0 && (wt(e, s, !0, !0), s = 0), s) : (Bt(`${Ve(e)}: _create_subscription() FAILED`), 0);
1104
+ if (!s) return Bt(`${Ve(e)}: _create_subscription() FAILED`), 0;
1105
+ if (sn(e.dl_subscriptions, s), sn(o.dl_subscribings, s), p && lt(p, "trace_subscriptions") && (L(n("💜💜👍 subscribing event '%s', publisher '%s', subscriber %s", t || "", Ve(e), Ve(o))), r && zt(r)), e.gclass.gmt.mt_subscription_added) {
1106
+ let t = e.gclass.gmt.mt_subscription_added(e, s);
1107
+ (t < 0 || !1 === t) && (wt(e, s, !0, !0), s = 0);
1108
+ }
1109
+ return s;
1105
1110
  }
1106
1111
  function At(e, t, n) {
1107
1112
  let r = [...t];
@@ -1130,7 +1135,7 @@
1130
1135
  if (e.gclass.gmt.mt_publication_pre_filter) {
1131
1136
  let n = e.gclass.gmt.mt_publication_pre_filter(e, a, t, r);
1132
1137
  if (n < 0) break;
1133
- if (0 === n) continue;
1138
+ if (!n) continue;
1134
1139
  }
1135
1140
  let u = $n(e, a, "subscriber", null, Ct.KW_REQUIRED);
1136
1141
  if (!u || Ye(u)) continue;
@@ -1138,8 +1143,8 @@
1138
1143
  if (yn(f) || 0 === Sn(f, t)) {
1139
1144
  Cn(e, a, "__config__", null, 0);
1140
1145
  let o = Cn(e, a, "__global__", null, 0), l = Cn(e, a, "__local__", null, 0), f = Ln(e, a, "__filter__", null, 0), g = r, d = 1;
1141
- if (e.gclass.gmt.mt_publication_filter ? d = e.gclass.gmt.mt_publication_filter(e, t, g, u) : fn(f) > 0 && (d = Gn(g, f), i && (L(n("💜💜🔄%s publishing with filter, event '%s', subscriber'%s', publisher %s", d ? "👍" : "👎", t || "", Ve(u), Ve(e))), zt(f))), d < 0) break;
1142
- if (0 === d) continue;
1146
+ if (e.gclass.gmt.mt_publication_filter ? d = e.gclass.gmt.mt_publication_filter(e, t, g, u) : fn(f) > 0 && (d = Gn(g, f) ? 1 : 0, i && (L(n("💜💜🔄%s publishing with filter, event '%s', subscriber'%s', publisher %s", d ? "👍" : "👎", t || "", Ve(u), Ve(e))), zt(f))), d < 0) break;
1147
+ if (!d) continue;
1143
1148
  let b = pt(u, t, !0);
1144
1149
  if (b && b.event_flag & D.EVF_SYSTEM_EVENT && !mt(u, b.event_name, 0)) continue;
1145
1150
  l && Nn(g, l), o && Zt(g, o), i && (L(n("🔝🔄 mach(%s%s), st: %s, ev: %s, from(%s%s)", u.running ? "" : "!!", Ve(u), bt(u), t || "", e && !e.running ? "!!" : "", Ve(e))), zt(g));