mirror of https://github.com/stashapp/stash.git
bitrate filter (#4713)
This commit is contained in:
parent
62b8ffb2b6
commit
a369613d42
|
@ -231,6 +231,8 @@ input SceneFilterType {
|
|||
orientation: OrientationCriterionInput
|
||||
"Filter by frame rate"
|
||||
framerate: IntCriterionInput
|
||||
"Filter by bit rate"
|
||||
bitrate: IntCriterionInput
|
||||
"Filter by video codec"
|
||||
video_codec: StringCriterionInput
|
||||
"Filter by audio codec"
|
||||
|
|
|
@ -43,6 +43,8 @@ type SceneFilterType struct {
|
|||
Orientation *OrientationCriterionInput `json:"orientation"`
|
||||
// Filter by framerate
|
||||
Framerate *IntCriterionInput `json:"framerate"`
|
||||
// Filter by bitrate
|
||||
Bitrate *IntCriterionInput `json:"bitrate"`
|
||||
// Filter by video codec
|
||||
VideoCodec *StringCriterionInput `json:"video_codec"`
|
||||
// Filter by audio codec
|
||||
|
|
|
@ -957,6 +957,7 @@ func (qb *SceneStore) makeFilter(ctx context.Context, sceneFilter *models.SceneF
|
|||
query.handleCriterion(ctx, resolutionCriterionHandler(sceneFilter.Resolution, "video_files.height", "video_files.width", qb.addVideoFilesTable))
|
||||
query.handleCriterion(ctx, orientationCriterionHandler(sceneFilter.Orientation, "video_files.height", "video_files.width", qb.addVideoFilesTable))
|
||||
query.handleCriterion(ctx, floatIntCriterionHandler(sceneFilter.Framerate, "ROUND(video_files.frame_rate)", qb.addVideoFilesTable))
|
||||
query.handleCriterion(ctx, intCriterionHandler(sceneFilter.Bitrate, "video_files.bit_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))
|
||||
|
||||
|
|
|
@ -82,6 +82,7 @@ const criterionOptions = [
|
|||
ResolutionCriterionOption,
|
||||
OrientationCriterionOption,
|
||||
createMandatoryNumberCriterionOption("framerate"),
|
||||
createMandatoryNumberCriterionOption("bitrate"),
|
||||
createStringCriterionOption("video_codec"),
|
||||
createStringCriterionOption("audio_codec"),
|
||||
createDurationCriterionOption("duration"),
|
||||
|
|
|
@ -131,6 +131,7 @@ export type CriterionType =
|
|||
| "resolution"
|
||||
| "average_resolution"
|
||||
| "framerate"
|
||||
| "bitrate"
|
||||
| "video_codec"
|
||||
| "audio_codec"
|
||||
| "duration"
|
||||
|
|
Loading…
Reference in New Issue