diff --git a/interfaces/Config/templates/config_notify.tmpl b/interfaces/Config/templates/config_notify.tmpl index d4915fc..8606fae 100644 --- a/interfaces/Config/templates/config_notify.tmpl +++ b/interfaces/Config/templates/config_notify.tmpl @@ -22,6 +22,7 @@ +

$T('defaultNotifiesAll')

@@ -40,6 +41,7 @@ +

$T('defaultNotifiesAll')

diff --git a/interfaces/Config/templates/config_sorting.tmpl b/interfaces/Config/templates/config_sorting.tmpl index a5c19a4..ce03858 100644 --- a/interfaces/Config/templates/config_sorting.tmpl +++ b/interfaces/Config/templates/config_sorting.tmpl @@ -11,12 +11,13 @@

$T('seriesSorting')

$T('affectedCat')
-

+

$T('selectOneCat')

@@ -223,12 +224,13 @@

$T('movieSort')

$T('affectedCat')
-

+

$T('selectOneCat')

@@ -419,12 +421,13 @@

$T('dateSorting')

$T('affectedCat')
-

+

$T('selectOneCat')

diff --git a/sabnzbd/cfg.py b/sabnzbd/cfg.py index 96abfe5..adcd19f 100644 --- a/sabnzbd/cfg.py +++ b/sabnzbd/cfg.py @@ -233,7 +233,7 @@ rating_filter_pause_keywords = OptionStr("misc", "rating_filter_pause_keywords") ############################################################################## enable_tv_sorting = OptionBool("misc", "enable_tv_sorting", False) tv_sort_string = OptionStr("misc", "tv_sort_string") -tv_categories = OptionList("misc", "tv_categories", "") +tv_categories = OptionList("misc", "tv_categories", ["tv"]) enable_movie_sorting = OptionBool("misc", "enable_movie_sorting", False) movie_sort_string = OptionStr("misc", "movie_sort_string") diff --git a/sabnzbd/skintext.py b/sabnzbd/skintext.py index 5d329a7..ccd2c79 100644 --- a/sabnzbd/skintext.py +++ b/sabnzbd/skintext.py @@ -705,6 +705,9 @@ SKIN_TEXT = { "link-download": TT("Download"), #: Config->RSS button "download item" "button-rssNow": TT("Read All Feeds Now"), #: Config->RSS button # Config->Notifications + "defaultNotifiesAll": TT( + "If only the Default category is selected, notifications are enabled for jobs in all categories." + ), "opt-email_endjob": TT("Email Notification On Job Completion"), "email-never": TT("Never"), #: When to send email "email-always": TT("Always"), #: When to send email @@ -777,6 +780,7 @@ SKIN_TEXT = { "catTags": TT("Indexer Categories / Groups"), "button-delCat": TT("X"), #: Small delete button # Config->Sorting + "selectOneCat": TT("Select at least 1 category."), "seriesSorting": TT("Series Sorting"), "opt-tvsort": TT("Enable TV Sorting"), "sort-legenda": TT("Pattern Key"), diff --git a/sabnzbd/sorting.py b/sabnzbd/sorting.py index 59b8d40..faf3c60 100644 --- a/sabnzbd/sorting.py +++ b/sabnzbd/sorting.py @@ -363,6 +363,10 @@ class SeriesSorter(BaseSorter): self.matched = True self.type = "tv" + # Require at least 1 category, this was not enforced before 3.4.0 + if cfg.enable_tv_sorting() and not self.cats: + logging.warning("%s: %s", T("Series Sorting"), T("Select at least 1 category.")) + def get_values(self): """Collect all values needed for path replacement""" self.get_year() @@ -426,6 +430,10 @@ class MovieSorter(BaseSorter): self.matched = True self.type = "movie" + # Require at least 1 category, this was not enforced before 3.4.0 + if cfg.enable_movie_sorting() and not self.cats: + logging.warning("%s: %s", T("Movie Sorting"), T("Select at least 1 category.")) + def get_values(self): """Collect all values needed for path replacement""" self.get_year() @@ -506,6 +514,10 @@ class DateSorter(BaseSorter): self.matched = True self.type = "date" + # Require at least 1 category, this was not enforced before 3.4.0 + if cfg.enable_date_sorting() and not self.cats: + logging.warning("%s: %s", T("Date Sorting"), T("Select at least 1 category.")) + def get_date(self): """Get month and day""" self.info["month"] = str(self.guess.get("date").month)