From 9cd223b8b15f7628d95548a9fc60d24cfc9e93ac Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 14 May 2020 10:29:30 +0200 Subject: [PATCH] [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. --- mpv/.config/mpv/scripts/sponsorblock_legacy.lua | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/mpv/.config/mpv/scripts/sponsorblock_legacy.lua b/mpv/.config/mpv/scripts/sponsorblock_legacy.lua index 1111f3e..f35bed8 100644 --- a/mpv/.config/mpv/scripts/sponsorblock_legacy.lua +++ b/mpv/.config/mpv/scripts/sponsorblock_legacy.lua @@ -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