Skip to content

Commit

Permalink
support yt-dlp option --paths subtitle:XXX
Browse files Browse the repository at this point in the history
  • Loading branch information
UlyssesZh committed Mar 24, 2024
1 parent c99a329 commit 0f71f03
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions yt_dlp_danmaku/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,9 @@ def run(self, info):
with new_path.open('w') as f:
f.write(ass)

files_to_move = info.get('__files_to_move', {})
if str(path) in files_to_move:
files_to_move[str(new_path)] = str(Path(files_to_move[str(path)]).with_suffix('.ass'))
del files_to_move[str(path)]

return [path], info

0 comments on commit 0f71f03

Please sign in to comment.