Added Sort Performers by Last O At / Last Played At / Play Count and Added Filter Performers by Play Count. Changes to display O Count rather than O-Counter for better consistency. Grammar fixes for 'Interactive Speed' and 'pHash'. (#4649)

* Sort Performers by Last O / View

Added 2 New Sorts 'Last O At' and 'Last Played At' for Performers

* Filter Performers by Play Count

Was not sure whether to label this 'views' as the code does, or 'plays' but chose the latter as it gives parity across the scenes and performers filters.

* Sort Performers by Play Count

Reutilised the prior selectPerformerLastOAtSQL code that was used to filter by play count to additionally provide useful sorting options.

* Replaced O-Counter with O Count

To better match other sort and filter options like Gallery Count, Image Count, Play Count, Scene Count, Tag Count, File Count, Performer Count and Play Count, we should really use O Count rather than O-Counter for increased legibility and coherence.

* Title Case on 'Interactive speed' and correct capitalization for 'phash'

Every other filter/sort option is using Title Case other than 'Interactive speed' which stands out as incorrect. Also, fixing the correct mid-word capitalization on phash to pHash.

* Formatting

Formatted source code and Ran all tests
This commit is contained in:
randemgame
2024-03-14 01:32:08 +02:00
committed by GitHub
parent ae6d1a8109
commit 3d0a8f653a
10 changed files with 128 additions and 22 deletions

View File

@@ -24,14 +24,14 @@ import { GalleriesCriterionOption } from "./criteria/galleries";
const defaultSortBy = "path";
const sortByOptions = [
"o_counter",
"filesize",
"file_count",
"date",
...MediaSortByOptions,
].map(ListFilterOptions.createSortBy);
const sortByOptions = ["filesize", "file_count", "date", ...MediaSortByOptions]
.map(ListFilterOptions.createSortBy)
.concat([
{
messageID: "o_count",
value: "o_counter",
},
]);
const displayModeOptions = [DisplayMode.Grid, DisplayMode.Wall];
const criterionOptions = [
createStringCriterionOption("title"),
@@ -42,7 +42,7 @@ const criterionOptions = [
PathCriterionOption,
GalleriesCriterionOption,
OrganizedCriterionOption,
createMandatoryNumberCriterionOption("o_counter"),
createMandatoryNumberCriterionOption("o_counter", "o_count"),
ResolutionCriterionOption,
OrientationCriterionOption,
ImageIsMissingCriterionOption,

View File

@@ -27,6 +27,9 @@ const sortByOptions = [
"random",
"rating",
"penis_length",
"play_count",
"last_played_at",
"last_o_at",
]
.map(ListFilterOptions.createSortBy)
.concat([
@@ -43,7 +46,7 @@ const sortByOptions = [
value: "galleries_count",
},
{
messageID: "o_counter",
messageID: "o_count",
value: "o_counter",
},
]);
@@ -91,7 +94,8 @@ const criterionOptions = [
createMandatoryNumberCriterionOption("scene_count"),
createMandatoryNumberCriterionOption("image_count"),
createMandatoryNumberCriterionOption("gallery_count"),
createMandatoryNumberCriterionOption("o_counter"),
createMandatoryNumberCriterionOption("play_count"),
createMandatoryNumberCriterionOption("o_counter", "o_count"),
createBooleanCriterionOption("ignore_auto_tag"),
CountryCriterionOption,
createNumberCriterionOption("height_cm", "height"),

View File

@@ -35,7 +35,6 @@ import { OrientationCriterionOption } from "./criteria/orientation";
const defaultSortBy = "date";
const sortByOptions = [
"organized",
"o_counter",
"date",
"file_count",
"filesize",
@@ -52,8 +51,14 @@ const sortByOptions = [
"interactive_speed",
"perceptual_similarity",
...MediaSortByOptions,
].map(ListFilterOptions.createSortBy);
]
.map(ListFilterOptions.createSortBy)
.concat([
{
messageID: "o_count",
value: "o_counter",
},
]);
const displayModeOptions = [
DisplayMode.Grid,
DisplayMode.List,
@@ -73,7 +78,7 @@ const criterionOptions = [
DuplicatedCriterionOption,
OrganizedCriterionOption,
RatingCriterionOption,
createMandatoryNumberCriterionOption("o_counter"),
createMandatoryNumberCriterionOption("o_counter", "o_count"),
ResolutionCriterionOption,
OrientationCriterionOption,
createMandatoryNumberCriterionOption("framerate"),