-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support new backwards-compatible features in server
v0.26.x
(#284)
Closes #265 Add support for various new features in the future Stash server version `v0.26.x`. Only ones that are backwards compatible are added.
- Loading branch information
1 parent
bd92e02
commit e83f78f
Showing
6 changed files
with
77 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
108 changes: 55 additions & 53 deletions
108
app/src/main/java/com/github/damontecres/stashapp/data/SortOptions.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,131 +1,133 @@ | ||
package com.github.damontecres.stashapp.data | ||
|
||
import com.github.damontecres.stashapp.R | ||
import com.github.damontecres.stashapp.util.Version | ||
|
||
data class SortOption(val key: String, val nameStringId: Int) | ||
data class SortOption( | ||
val key: String, | ||
val nameStringId: Int, | ||
val requiresVersion: Version = Version.MINIMUM_STASH_VERSION, | ||
) | ||
|
||
val COMMON_SORT_OPTIONS = | ||
arrayOf( | ||
SortOption("created_at", R.string.stashapp_created_at), | ||
SortOption("updated_at", R.string.stashapp_updated_at), | ||
SortOption("random", R.string.stashapp_random), | ||
) | ||
|
||
val SCENE_SORT_OPTIONS = | ||
listOf( | ||
*COMMON_SORT_OPTIONS, | ||
SortOption("title", R.string.stashapp_title), | ||
SortOption("path", R.string.stashapp_path), | ||
SortOption("rating", R.string.stashapp_rating), | ||
SortOption("file_mod_time", R.string.stashapp_file_mod_time), | ||
SortOption("tag_count", R.string.stashapp_tag_count), | ||
SortOption("performer_count", R.string.stashapp_performer_count), | ||
SortOption("random", R.string.stashapp_random), | ||
SortOption("organized", R.string.stashapp_organized), | ||
SortOption("o_counter", R.string.stashapp_o_counter), | ||
SortOption("bitrate", R.string.stashapp_bitrate), | ||
SortOption("date", R.string.stashapp_date), | ||
SortOption("duration", R.string.stashapp_duration), | ||
SortOption("file_count", R.string.stashapp_file_count), | ||
SortOption("file_mod_time", R.string.stashapp_file_mod_time), | ||
SortOption("filesize", R.string.stashapp_filesize), | ||
SortOption("duration", R.string.stashapp_duration), | ||
SortOption("framerate", R.string.stashapp_framerate), | ||
SortOption("bitrate", R.string.stashapp_bitrate), | ||
SortOption("last_played_at", R.string.stashapp_last_played_at), | ||
SortOption("resume_time", R.string.stashapp_resume_time), | ||
SortOption("play_duration", R.string.stashapp_play_duration), | ||
SortOption("play_count", R.string.stashapp_play_count), | ||
SortOption("movie_scene_number", R.string.stashapp_movie_scene_number), | ||
SortOption("interactive", R.string.stashapp_interactive), | ||
SortOption("interactive_speed", R.string.stashapp_interactive_speed), | ||
SortOption("last_o_at", R.string.stashapp_last_o_at, Version.V0_26_0), | ||
SortOption("last_played_at", R.string.stashapp_last_played_at), | ||
SortOption("movie_scene_number", R.string.stashapp_movie_scene_number), | ||
SortOption("o_counter", R.string.stashapp_o_count), | ||
SortOption("organized", R.string.stashapp_organized), | ||
SortOption("path", R.string.stashapp_path), | ||
SortOption("perceptual_similarity", R.string.stashapp_perceptual_similarity), | ||
SortOption("performer_count", R.string.stashapp_performer_count), | ||
SortOption("play_count", R.string.stashapp_play_count), | ||
SortOption("play_duration", R.string.stashapp_play_duration), | ||
SortOption("rating", R.string.stashapp_rating), | ||
SortOption("resume_time", R.string.stashapp_resume_time), | ||
SortOption("tag_count", R.string.stashapp_tag_count), | ||
SortOption("title", R.string.stashapp_title), | ||
) | ||
|
||
val GALLERY_SORT_OPTIONS = | ||
listOf( | ||
*COMMON_SORT_OPTIONS, | ||
SortOption("title", R.string.stashapp_title), | ||
SortOption("date", R.string.stashapp_date), | ||
SortOption("file_count", R.string.stashapp_zip_file_count), | ||
SortOption("file_mod_time", R.string.stashapp_file_mod_time), | ||
SortOption("images_count", R.string.stashapp_image_count), | ||
SortOption("path", R.string.stashapp_path), | ||
SortOption("performer_count", R.string.stashapp_performer_count), | ||
SortOption("rating", R.string.stashapp_rating), | ||
SortOption("file_mod_time", R.string.stashapp_file_mod_time), | ||
SortOption("tag_count", R.string.stashapp_tag_count), | ||
SortOption("performer_count", R.string.stashapp_performer_count), | ||
SortOption("random", R.string.stashapp_random), | ||
SortOption("date", R.string.stashapp_date), | ||
SortOption("images_count", R.string.stashapp_image_count), | ||
SortOption("file_count", R.string.stashapp_zip_file_count), | ||
SortOption("title", R.string.stashapp_title), | ||
) | ||
|
||
val IMAGE_SORT_OPTIONS = | ||
listOf( | ||
*COMMON_SORT_OPTIONS, | ||
SortOption("title", R.string.stashapp_title), | ||
SortOption("date", R.string.stashapp_date), | ||
SortOption("file_count", R.string.stashapp_file_count), | ||
SortOption("file_mod_time", R.string.stashapp_file_mod_time), | ||
SortOption("filesize", R.string.stashapp_filesize), | ||
SortOption("o_counter", R.string.stashapp_o_count), | ||
SortOption("path", R.string.stashapp_path), | ||
SortOption("performer_count", R.string.stashapp_performer_count), | ||
SortOption("rating", R.string.stashapp_rating), | ||
SortOption("file_mod_time", R.string.stashapp_file_mod_time), | ||
SortOption("tag_count", R.string.stashapp_tag_count), | ||
SortOption("performer_count", R.string.stashapp_performer_count), | ||
SortOption("random", R.string.stashapp_random), | ||
SortOption("o_counter", R.string.stashapp_o_counter), | ||
SortOption("filesize", R.string.stashapp_filesize), | ||
SortOption("file_count", R.string.stashapp_file_count), | ||
SortOption("date", R.string.stashapp_date), | ||
SortOption("title", R.string.stashapp_title), | ||
) | ||
|
||
val MOVIE_SORT_OPTIONS = | ||
listOf( | ||
*COMMON_SORT_OPTIONS, | ||
SortOption("name", R.string.stashapp_name), | ||
SortOption("random", R.string.stashapp_random), | ||
SortOption("date", R.string.stashapp_date), | ||
SortOption("duration", R.string.stashapp_duration), | ||
SortOption("name", R.string.stashapp_name), | ||
SortOption("rating", R.string.stashapp_rating), | ||
SortOption("scenes_count", R.string.stashapp_scene_count), | ||
) | ||
|
||
val PERFORMER_SORT_OPTIONS = | ||
listOf( | ||
*COMMON_SORT_OPTIONS, | ||
SortOption("name", R.string.stashapp_name), | ||
SortOption("height", R.string.stashapp_height), | ||
SortOption("birthdate", R.string.stashapp_birthdate), | ||
SortOption("tag_count", R.string.stashapp_tag_count), | ||
SortOption("random", R.string.stashapp_random), | ||
SortOption("rating", R.string.stashapp_rating), | ||
SortOption("galleries_count", R.string.stashapp_gallery_count), | ||
SortOption("height", R.string.stashapp_height), | ||
SortOption("images_count", R.string.stashapp_image_count), | ||
SortOption("last_o_at", R.string.stashapp_last_o_at, Version.V0_26_0), | ||
SortOption("last_played_at", R.string.stashapp_last_played_at, Version.V0_26_0), | ||
SortOption("name", R.string.stashapp_name), | ||
SortOption("o_counter", R.string.stashapp_o_count), | ||
SortOption("penis_length", R.string.stashapp_penis_length), | ||
SortOption("play_count", R.string.stashapp_play_count, Version.V0_26_0), | ||
SortOption("rating", R.string.stashapp_rating), | ||
SortOption("scenes_count", R.string.stashapp_scene_count), | ||
SortOption("images_count", R.string.stashapp_image_count), | ||
SortOption("galleries_count", R.string.stashapp_gallery_count), | ||
SortOption("o_counter", R.string.stashapp_o_counter), | ||
SortOption("tag_count", R.string.stashapp_tag_count), | ||
) | ||
|
||
val MARKER_SORT_OPTIONS = | ||
listOf( | ||
*COMMON_SORT_OPTIONS, | ||
SortOption("title", R.string.stashapp_title), | ||
SortOption("seconds", R.string.stashapp_seconds), | ||
SortOption("scene_id", R.string.stashapp_scene_id), | ||
SortOption("random", R.string.stashapp_random), | ||
SortOption("scenes_updated_at", R.string.stashapp_scenes_updated_at), | ||
SortOption("seconds", R.string.stashapp_seconds), | ||
SortOption("title", R.string.stashapp_title), | ||
) | ||
|
||
val STUDIO_SORT_OPTIONS = | ||
listOf( | ||
*COMMON_SORT_OPTIONS, | ||
SortOption("child_count", R.string.stashapp_subsidiary_studio_count), | ||
SortOption("galleries_count", R.string.stashapp_gallery_count), | ||
SortOption("images_count", R.string.stashapp_image_count), | ||
SortOption("name", R.string.stashapp_name), | ||
SortOption("random", R.string.stashapp_random), | ||
SortOption("rating", R.string.stashapp_rating), | ||
SortOption("scenes_count", R.string.stashapp_scene_count), | ||
SortOption("images_count", R.string.stashapp_image_count), | ||
SortOption("galleries_count", R.string.stashapp_gallery_count), | ||
SortOption("child_count", R.string.stashapp_subsidiary_studio_count), | ||
) | ||
|
||
val TAG_SORT_OPTIONS = | ||
listOf( | ||
*COMMON_SORT_OPTIONS, | ||
SortOption("name", R.string.stashapp_name), | ||
SortOption("random", R.string.stashapp_random), | ||
SortOption("scenes_count", R.string.stashapp_scene_count), | ||
SortOption("images_count", R.string.stashapp_image_count), | ||
SortOption("galleries_count", R.string.stashapp_gallery_count), | ||
SortOption("images_count", R.string.stashapp_image_count), | ||
SortOption("name", R.string.stashapp_name), | ||
SortOption("performers_count", R.string.stashapp_performer_count), | ||
SortOption("scene_markers_count", R.string.stashapp_marker_count), | ||
SortOption("scenes_count", R.string.stashapp_scene_count), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule stash-server
updated
287 files