From f4b34bafd0f06782f4a97d692586b08eaf7953e6 Mon Sep 17 00:00:00 2001 From: tcely Date: Wed, 12 Feb 2025 23:52:35 -0500 Subject: [PATCH] Use `FilterSeconds` in `models.py` --- tubesync/sync/models.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/tubesync/sync/models.py b/tubesync/sync/models.py index 451313b3..dc38d290 100644 --- a/tubesync/sync/models.py +++ b/tubesync/sync/models.py @@ -27,7 +27,7 @@ from .matching import (get_best_combined_format, get_best_audio_format, from .mediaservers import PlexMediaServer from .fields import CommaSepChoiceField from .choices import (V, CapChoices, Fallback, FileExtension, - IndexSchedule, MediaServerType, + FilterSeconds, IndexSchedule, MediaServerType, SourceResolution, SourceResolutionInteger, SponsorBlock_Category, YouTube_AudioCodec, YouTube_SourceType, YouTube_VideoCodec) @@ -58,11 +58,6 @@ class Source(models.Model): FALLBACK_NEXT_BEST = V(Fallback.NEXT_BEST) FALLBACK_NEXT_BEST_HD = V(Fallback.NEXT_BEST_HD) - FILTER_SECONDS_CHOICES = ( - (True, _('Minimum Length')), - (False, _('Maximum Length')), - ) - sponsorblock_categories = CommaSepChoiceField( _(''), max_length=128, @@ -234,8 +229,8 @@ class Source(models.Model): ) filter_seconds_min = models.BooleanField( _('filter seconds min/max'), - choices=FILTER_SECONDS_CHOICES, - default=True, + choices=FilterSeconds.choices, + default=V(FilterSeconds.MIN), help_text=_('When Filter Seconds is > 0, do we skip on minimum (video shorter than limit) or maximum (video ' 'greater than maximum) video duration') )