fix: Strip '#' from sanitized filenames to prevent broken clip URLs
YouTube titles containing '#' (e.g. hashtags like #shorts) were saved to disk correctly, but the browser parses '#' as a URL fragment, so the frontend could never request the actual file and clips appeared missing. Add '#' to the regex in sanitize_filename(). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
dc93df40b0
commit
6a83ebdcd7
1 changed files with 1 additions and 1 deletions
2
main.py
2
main.py
|
|
@ -444,7 +444,7 @@ def get_video_resolution(video_path):
|
||||||
|
|
||||||
def sanitize_filename(filename):
|
def sanitize_filename(filename):
|
||||||
"""Remove invalid characters from filename."""
|
"""Remove invalid characters from filename."""
|
||||||
filename = re.sub(r'[<>:"/\\|?*]', '', filename)
|
filename = re.sub(r'[<>:"/\\|?*#]', '', filename)
|
||||||
filename = filename.replace(' ', '_')
|
filename = filename.replace(' ', '_')
|
||||||
return filename[:100]
|
return filename[:100]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue