[mpv] Implement robust sponsorblock solution

Used po5's simpler and more stable solution for getting the correct
configuration file directory to start the sponsorblock plugin on older
mpv installations.
This commit is contained in:
Marty Oehme 2020-05-14 10:29:30 +02:00
parent 2c11d14cbd
commit 9cd223b8b1
No known key found for this signature in database
GPG key ID: 0CCB0526EFB9611A

View file

@ -1,9 +1,3 @@
if mp.get_script_directory == nil then
local scriptpath = debug.getinfo(1).short_src:match('.*/')
local originalpath = package.path
package.path = scriptpath .. "?.lua"
require 'sponsorblock/main'
package.path = originalpath
dofile(mp.find_config_file("scripts/sponsorblock/main.lua"))
end