Use FilterSeconds in models.py

This commit is contained in:
tcely 2025-02-12 23:52:35 -05:00 committed by GitHub
parent edd320b786
commit f4b34bafd0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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')
)