Files
stash/ui/v2.5/graphql/mutations/scene-marker.graphql
MinasukiHikimuna 0d40056f8c Markers can have end time (#5311)
* Markers can have end time

Other metadata sources such as ThePornDB and timestamp.trade support end times for markers but Stash did not yet support saving those. This is a first step which only allows end time to be set either via API or via UI. Other aspects of Stash such as video player timeline are not yet updated to take end time into account.

- User can set end time when creating or editing markers in the UI or in the API.
- End time cannot be before start time. This is validated in the backend and for better UX also in the frontend.
- End time is shown in scene details view or markers wall view if present.
- GraphQL API does not require end_seconds.
---------
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
2024-11-02 11:55:48 +11:00

50 lines
885 B
GraphQL

mutation SceneMarkerCreate(
$title: String!
$seconds: Float!
$end_seconds: Float
$scene_id: ID!
$primary_tag_id: ID!
$tag_ids: [ID!] = []
) {
sceneMarkerCreate(
input: {
title: $title
seconds: $seconds
end_seconds: $end_seconds
scene_id: $scene_id
primary_tag_id: $primary_tag_id
tag_ids: $tag_ids
}
) {
...SceneMarkerData
}
}
mutation SceneMarkerUpdate(
$id: ID!
$title: String!
$seconds: Float!
$end_seconds: Float
$scene_id: ID!
$primary_tag_id: ID!
$tag_ids: [ID!] = []
) {
sceneMarkerUpdate(
input: {
id: $id
title: $title
seconds: $seconds
end_seconds: $end_seconds
scene_id: $scene_id
primary_tag_id: $primary_tag_id
tag_ids: $tag_ids
}
) {
...SceneMarkerData
}
}
mutation SceneMarkerDestroy($id: ID!) {
sceneMarkerDestroy(id: $id)
}