Skip to content

Commit

Permalink
Update AutoSubs V2.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
tmoroney committed Dec 8, 2024
1 parent 3bdd3ce commit 46a5d9e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions AutoSubs-App/src-tauri/resources/AutoSubs V2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,8 @@ function CreateResponse(body)
end

-- UTILS

function lstrip(str)
return utf8.gsub(str, "^%s+", "")
return str:gsub("^%s*(.-)%s*$", "%1")
end

-- Convert hex color to RGB (Davinci Resolve uses 0-1 range)
Expand Down Expand Up @@ -422,9 +421,9 @@ function AddSubtitles(filePath, trackIndex, templateName, textFormat, removePunc
subtitleText = utf8.lower(subtitleText)
end

if #sensitiveWords > 0 then
subtitleText = RemoveSensitiveWords(subtitleText, sensitiveWords)
end
-- if #sensitiveWords > 0 then
-- subtitleText = RemoveSensitiveWords(subtitleText, sensitiveWords)
-- end

-- Skip if text is not compatible
if timelineItem:GetFusionCompCount() > 0 then
Expand Down

0 comments on commit 46a5d9e

Please sign in to comment.