mirror of https://github.com/stashapp/stash.git
scene framerate filter (#4161)
This commit is contained in:
parent
8eb069054e
commit
7605eec6da
|
@ -225,6 +225,8 @@ input SceneFilterType {
|
|||
duplicated: PHashDuplicationCriterionInput
|
||||
"Filter by resolution"
|
||||
resolution: ResolutionCriterionInput
|
||||
"Filter by frame rate"
|
||||
framerate: IntCriterionInput
|
||||
"Filter by video codec"
|
||||
video_codec: StringCriterionInput
|
||||
"Filter by audio codec"
|
||||
|
|
|
@ -41,6 +41,8 @@ type SceneFilterType struct {
|
|||
Duplicated *PHashDuplicationCriterionInput `json:"duplicated"`
|
||||
// Filter by resolution
|
||||
Resolution *ResolutionCriterionInput `json:"resolution"`
|
||||
// Filter by framerate
|
||||
Framerate *IntCriterionInput `json:"framerate"`
|
||||
// Filter by video codec
|
||||
VideoCodec *StringCriterionInput `json:"video_codec"`
|
||||
// Filter by audio codec
|
||||
|
|
|
@ -983,7 +983,7 @@ func (qb *SceneStore) makeFilter(ctx context.Context, sceneFilter *models.SceneF
|
|||
|
||||
query.handleCriterion(ctx, floatIntCriterionHandler(sceneFilter.Duration, "video_files.duration", qb.addVideoFilesTable))
|
||||
query.handleCriterion(ctx, resolutionCriterionHandler(sceneFilter.Resolution, "video_files.height", "video_files.width", qb.addVideoFilesTable))
|
||||
|
||||
query.handleCriterion(ctx, floatIntCriterionHandler(sceneFilter.Framerate, "ROUND(video_files.frame_rate)", qb.addVideoFilesTable))
|
||||
query.handleCriterion(ctx, codecCriterionHandler(sceneFilter.VideoCodec, "video_files.video_codec", qb.addVideoFilesTable))
|
||||
query.handleCriterion(ctx, codecCriterionHandler(sceneFilter.AudioCodec, "video_files.audio_codec", qb.addVideoFilesTable))
|
||||
|
||||
|
|
|
@ -72,6 +72,7 @@ const criterionOptions = [
|
|||
RatingCriterionOption,
|
||||
createMandatoryNumberCriterionOption("o_counter"),
|
||||
ResolutionCriterionOption,
|
||||
createMandatoryNumberCriterionOption("framerate"),
|
||||
createStringCriterionOption("video_codec"),
|
||||
createStringCriterionOption("audio_codec"),
|
||||
createDurationCriterionOption("duration"),
|
||||
|
|
|
@ -120,6 +120,7 @@ export type CriterionType =
|
|||
| "o_counter"
|
||||
| "resolution"
|
||||
| "average_resolution"
|
||||
| "framerate"
|
||||
| "video_codec"
|
||||
| "audio_codec"
|
||||
| "duration"
|
||||
|
|
Loading…
Reference in New Issue