Skip to content

Commit

Permalink
Update Script.py
Browse files Browse the repository at this point in the history
  • Loading branch information
MajdLHB authored Aug 9, 2024
1 parent 992faa6 commit cdac1a9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Script.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,9 +418,17 @@ def EncodeSRT(encoding='utf-8'):
global Series
global prevSeason
global prevEpisode
outputFilePath = FilePath.replace('MajdSub', 'MajdSubV1')

with open(FilePath, 'r', encoding='utf-8') as f:
Content = f.read()

outputFilePath = FilePath.replace('MajdSub', 'MajdSubV1')
outputDir = os.path.dirname(outputFilePath)


if not os.path.exists(outputDir):
os.makedirs(outputDir)


with open(outputFilePath, 'w', encoding=encoding) as f:
f.write(Content)
Expand Down

0 comments on commit cdac1a9

Please sign in to comment.