Skip to content

Commit

Permalink
修复文件名过长导致录制失败
Browse files Browse the repository at this point in the history
  • Loading branch information
auqhjjqdo committed Dec 3, 2023
1 parent 0d8d701 commit 24b9df8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions live_recorder.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ def get_filename(self, title, format):
'?': '?',
'/': '/',
'\\': '\',
'|': '|',
'|': '|'
}
for half, full in char_dict.items():
title = title.replace(half, full)
filename = f'[{live_time}]{self.flag}{title}.{format}'
filename = f'[{live_time}]{self.flag}{title[:50]}.{format}'
return filename

def get_streamlink(self):
Expand Down

0 comments on commit 24b9df8

Please sign in to comment.