diff --git a/sponsorblock.lua b/sponsorblock.lua index 96bfb24..91b2c31 100644 --- a/sponsorblock.lua +++ b/sponsorblock.lua @@ -92,11 +92,16 @@ end options.local_database = false local utils = require "mp.utils" -scripts_dir = mp.find_config_file("scripts") +local function expand_path(path) + return mp.command_native({"expand-path", path}) +end + +local sponsorblock = mp.find_config_file("scripts/sponsorblock_shared/sponsorblock.py") +local uid_path = expand_path("~~state/sponsorblock.txt") +local database_file = options.local_database and expand_path("~~cache/sponsorblock.db") or "" +mp.msg.debug("uid_path: " .. uid_path) +mp.msg.debug("database_file: " .. database_file) -local sponsorblock = utils.join_path(scripts_dir, "sponsorblock_shared/sponsorblock.py") -local uid_path = utils.join_path(scripts_dir, "sponsorblock_shared/sponsorblock.txt") -local database_file = options.local_database and utils.join_path(scripts_dir, "sponsorblock_shared/sponsorblock.db") or "" local youtube_id = nil local ranges = {} local init = false