chore(api): drop unused has_animated_thumbnail scene filter

The hold-to-preview gesture is being removed (did nothing useful), and no client
sends this filter. Remove the Query param, its EXISTS filter, and the pure-default
count guard reference.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
jtrzupek 2026-06-09 09:52:15 +02:00
parent e98ef6577e
commit e1c7efb947

View file

@ -126,10 +126,6 @@ def list_scenes(
has_playback: bool | None = Query(
default=None, description="True: tylko sceny z ≥1 playback_source"
),
has_animated_thumbnail: bool | None = Query(
default=None,
description="True: tylko sceny z ≥1 playback_source z animated_thumbnail_url (hold-to-preview)",
),
min_duration_sec: int | None = Query(default=None, ge=0),
max_duration_sec: int | None = Query(default=None, ge=0),
released_within_days: int | None = Query(
@ -289,16 +285,6 @@ def list_scenes(
)
)
if has_animated_thumbnail:
base = base.where(
exists(
select(1).where(
PlaybackSource.scene_id == Scene.id,
PlaybackSource.dead_at.is_(None),
PlaybackSource.animated_thumbnail_url.isnot(None),
)
)
)
if min_duration_sec is not None:
base = base.where(Scene.duration_sec >= min_duration_sec)
@ -358,7 +344,7 @@ def list_scenes(
_is_pure_default = (
not include_stubs and not q and not studio_slug_list and not tag_slug_list
and not perf_id_strings and origin is None and has_playback is None
and not has_animated_thumbnail and min_duration_sec is None
and min_duration_sec is None
and max_duration_sec is None and released_within_days is None
and min_quality_p is None
)