jhj0517 commited on
Commit
92e709c
1 Parent(s): 5ae0fc7

fix name truncation

Browse files
Files changed (1) hide show
  1. modules/subtitle_manager.py +2 -1
modules/subtitle_manager.py CHANGED
@@ -122,7 +122,8 @@ def safe_filename(name):
122
  from app import _args
123
  INVALID_FILENAME_CHARS = r'[<>:"/\\|?*\x00-\x1f]'
124
  safe_name = re.sub(INVALID_FILENAME_CHARS, '_', name)
125
- if _args.colab:
 
126
  return safe_name
127
  # Truncate the filename if it exceeds the max_length (20)
128
  if len(safe_name) > 20:
 
122
  from app import _args
123
  INVALID_FILENAME_CHARS = r'[<>:"/\\|?*\x00-\x1f]'
124
  safe_name = re.sub(INVALID_FILENAME_CHARS, '_', name)
125
+ print(f"_args.colab: {_args.colab}")
126
+ if not _args.colab:
127
  return safe_name
128
  # Truncate the filename if it exceeds the max_length (20)
129
  if len(safe_name) > 20: