po5 / mpv_sponsorblock

mpv script to skip sponsored segments of YouTube videos
GNU General Public License v3.0
531 stars 29 forks source link

Add option to hide OSD message #45

Open dariusjonda opened 2 years ago

dariusjonda commented 2 years ago

referring to the feature request in issue #44 I've added the osd_text_show option to choose whether to show the OSD message or not whenever a SponsorBlock action is being triggered. The function osd_show() has been added to return the actual SponsorBlock text in case ost_text_show = true and an empty string when set to false.

I've never done anything in Lua before, therefore my simple solution might not be the most elegant one. However I hope this is kinda helpful...

po5 commented 2 years ago

This is a bad hack that will display empty messages instead of nothing at all.
It will play badly with other scripts displaying their own messages.
These mp.osd_message() calls shouldn't happen.