zydezu / ModernX

My fork of modernX (a replacement for MPV that retains the functionality of the default OSC), adding additional features - see builds at: https://github.com/zydezu/mpvconfig
131 stars 5 forks source link

Dislikes API should only run if updatetitleyoutubestats or showdescription is set to true. #51

Closed Samillion closed 2 days ago

Samillion commented 1 week ago

If user_opts does not require exec_dislikes(), halt API calls through curl.

https://github.com/zydezu/ModernX/blob/4e7ec24f8b05df23c962dae5a02980cf4b90aee1/modernx.lua#L1363-L1365

For example:

if  path:find('youtu%.?be') and (user_opts.showdescription or user_opts.updatetitleyoutubestats) then