Skip to content

Commit

Permalink
Update tormyvancool_YOUTUBE Downloader.lua
Browse files Browse the repository at this point in the history
Implemented the solution here, to detect the script's folder
https://forums.cockos.com/showpost.php?p=2821129&postcount=11
  • Loading branch information
tormyvancool authored Nov 9, 2024
1 parent b550e01 commit 96e27c6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Video/tormyvancool_YOUTUBE Downloader.lua
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ local ProjDir = reaper.GetProjectPathEx(0)
local ResourcePATH = reaper.GetResourcePath()
local VideoPath = 'Video'
_,ScriptName = reaper.get_action_context()
local ScriptPath = ScriptName:match('^.+[\\/]') -- Script Path
local ScriptPath = ScriptName:match('^.+' .. package.config:sub(1, 1)) -- Script Path
local CallPath = ScriptPath .. 'yt-dlp/' -- Get FullPath to yt-dlp

-- CHECK IF YT-DLP FOLDER IS CREATED BY REAPACK AS EXPECTED
Expand All @@ -148,7 +148,8 @@ local CallPath = ScriptPath .. 'yt-dlp/' -- Get FullPath to yt-dlp
---------------------------------------------
-- FUNCTIONS
---------------------------------------------



-- SLEEP(SECONDS)
function sleep(n)
local t0 = clock()
Expand Down

0 comments on commit 96e27c6

Please sign in to comment.