mpv icon indicating copy to clipboard operation
mpv copied to clipboard

shared_script_properties_observe: only run callback when observed value changes

Open CogentRedTester opened this issue 3 years ago • 1 comments

Even though these functions aren't documented a number of scripts have started to write to this property. This commit adds the bare minimum optimisation to the shared_script_property_observe function so that the callback is only run when the observed sub-property actually changes.

CogentRedTester avatar Oct 17 '22 12:10 CogentRedTester

I don't think we should take this. If they care, users should take into account that it can be called even without change, just like they need to take that into account while observing any other property.

avih avatar Oct 17 '22 13:10 avih

Since we have user-data now, I think this is obsolete. The fix is to just use that instead so I'll close this if you don't mind.

Dudemanguy avatar Feb 26 '23 05:02 Dudemanguy