Accept '-' in sub_langs

This commit is contained in:
tcely 2024-12-09 18:05:45 -05:00 committed by GitHub
parent 40e48c9317
commit 049c6f3764
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -422,7 +422,7 @@ class Source(models.Model):
help_text=_('List of subtitles langs to download, comma-separated. Example: en,fr or all,-fr,-live_chat'),
validators=[
RegexValidator(
regex=r"^(\-?[\_\.a-zA-Z]+,)*(\-?[\_\.a-zA-Z]+){1}$",
regex=r"^(\-?[\_\.a-zA-Z-]+,)*(\-?[\_\.a-zA-Z-]+){1}$",
message=_('Subtitle langs must be a comma-separated list of langs. example: en,fr or all,-fr,-live_chat')
)
]