From 63d0f4f15a563f71bd66dff55f41fad2e700276f Mon Sep 17 00:00:00 2001 From: tcely Date: Tue, 10 Dec 2024 02:02:30 -0500 Subject: [PATCH] Simplify regex for sub_langs --- tubesync/sync/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tubesync/sync/models.py b/tubesync/sync/models.py index 88fd0b12..4f9de7f7 100644 --- a/tubesync/sync/models.py +++ b/tubesync/sync/models.py @@ -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-]+(,|$))+", message=_('Subtitle langs must be a comma-separated list of langs. example: en,fr or all,-fr,-live_chat') ) ]