local prev local print_sub = function(_, sub) if sub and #sub > 0 and sub ~= last then print(sub) prev = sub end end mp.observe_property("sub-text", "string", print_sub)