Compare commits

...

21 Commits

Author SHA1 Message Date
15be60f2ca Create reserved query for get shots with metadata
All checks were successful
Tests / Tests (pull_request) Successful in 15s
2024-10-11 17:56:30 -06:00
59aaf47cbe Merge pull request 'Add a lightweight GQL call to get video header info' (#73) from loewy/add-lightweight-get-video-with-just-header-info into master
Reviewed-on: #73
2024-10-10 18:33:42 -06:00
c426e753cd add lightweigth gql call to get video header info
All checks were successful
Tests / Tests (pull_request) Successful in 15s
2024-10-10 17:02:18 -07:00
c8cf97421b Merge pull request 'Add id to shots: video items to prevent cache merge issues' (#72) from loewy/add-id-to-fix-cache-merging-issue into master
Reviewed-on: #72
2024-10-07 22:15:38 -06:00
9718137ad3 add id to prevent cache merge issues
All checks were successful
Tests / Tests (pull_request) Successful in 8s
2024-10-07 21:14:47 -07:00
af1fb3fee7 Merge pull request 'Add a lightweight query to get video thumbnail and info from getShotsResultGql' (#71) from loewy/get-shots-with-video into master
Reviewed-on: #71
Reviewed-by: Kat Huang <kkathuang@gmail.com>
2024-10-07 20:19:14 -06:00
025baf257a add a lightweight query to get video thumbnail and info from getShotsResultGql
All checks were successful
Tests / Tests (pull_request) Successful in 9s
2024-10-07 16:51:53 -07:00
8239ab6e1b Add a username filter 2024-10-06 13:44:53 -06:00
1f018f954e Add all targetPocketIntention features to shot retrieval 2024-10-06 13:16:39 -06:00
fd78ddf641 Add marginOfErrorInDegrees 2024-10-06 12:52:13 -06:00
7662f1f050 Merge pull request 'Add day back' (#70) from kat/add-day-back into master
Reviewed-on: #70
2024-10-05 14:44:27 -06:00
890bea2571 Add day back
All checks were successful
Tests / Tests (pull_request) Successful in 7s
2024-10-05 14:33:39 -06:00
f57f6dc32d Merge pull request 'Add day' (#69) from kat/update-gql into master
Reviewed-on: #69
2024-10-04 23:49:52 -06:00
14863e3357 Add day
All checks were successful
Tests / Tests (pull_request) Successful in 6s
2024-10-04 22:56:58 -06:00
Your Name
58f01c567c Add day alignment 2024-10-03 21:57:07 -06:00
937368c753 GetShotsWithMetadata accepts ids (#68)
Reviewed-on: #68
2024-10-03 12:36:35 -06:00
d8c11875d4 Merge pull request 'Update get shots with metadata' (#67) from kat/update-gql into master
Reviewed-on: #67
Reviewed-by: Ivan Malison <ivanmalison@gmail.com>
2024-10-03 11:47:20 -06:00
bacd9e77f0 Update get shots with metadata
All checks were successful
Tests / Tests (pull_request) Successful in 14s
2024-10-03 11:42:39 -06:00
69d755ba32 Merge pull request 'Use ShotWithAllFeatures in getAllShots' (#66) from kat/use-fragment-get-shots into master
Reviewed-on: #66
2024-10-02 19:09:50 -06:00
31fb95e3b0 Use ShotWithAllFeatures in getAllShots
All checks were successful
Tests / Tests (pull_request) Successful in 13s
2024-10-02 18:15:00 -06:00
7d0f9870dd Merge pull request 'Delete unused get shots operation' (#65) from kat/delete-unused-get-shots into master
Reviewed-on: #65
2024-10-02 17:46:26 -06:00
4 changed files with 670 additions and 183 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -17,70 +17,65 @@ query GetShotAnnotationTypes {
}
}
query GetShotsWithMetadata(
query GetShotsWithVideoGql($filterInput: FilterInput!, $limit: Int) {
getShotsWithMetadata(filterInput: $filterInput, limit: $limit) {
ids
shots {
id
videoId
video {
screenshotUri
endTime
}
}
}
}
## Reserved for playlists (which are created from a filter)
query GetShotsWithMetadataFilterResult(
$filterInput: FilterInput!
$shotsPagination: GetShotsPagination
$limit: Int
$includeCreatedAt: Boolean! = false
$includeUpdatedAt: Boolean! = false
$includeCueObjectFeatures: Boolean! = false
$includePocketingIntentionFeatures: Boolean! = false
$includeCueObjectDistance: Boolean! = false
$includeCueObjectAngle: Boolean! = false
$includeCueBallSpeed: Boolean! = false
$includeSpinType: Boolean! = false
$includeShotDirection: Boolean! = false
$includeTargetPocketDistance: Boolean! = false
$includeMake: Boolean! = false
$includeIntendedPocketType: Boolean! = false
$ids: [Int!]
) {
getShotsWithMetadata(
filterInput: $filterInput
shotsPagination: $shotsPagination
limit: $limit
ids: $ids
) {
count
shots {
id
videoId
startFrame
endFrame
user {
id
}
falsePositiveScore
video {
stream {
resolution {
width
height
}
}
}
createdAt @include(if: $includeCreatedAt)
updatedAt @include(if: $includeUpdatedAt)
cueObjectFeatures @include(if: $includeCueObjectFeatures) {
cueObjectDistance @include(if: $includeCueObjectDistance)
cueObjectAngle @include(if: $includeCueObjectAngle)
cueBallSpeed @include(if: $includeCueBallSpeed)
shotDirection @include(if: $includeShotDirection)
spinType @include(if: $includeSpinType)
}
pocketingIntentionFeatures
@include(if: $includePocketingIntentionFeatures) {
targetPocketDistance @include(if: $includeTargetPocketDistance)
make @include(if: $includeMake)
intendedPocketType @include(if: $includeIntendedPocketType)
}
pocketingIntentionInfo @include(if: $includePocketingIntentionFeatures) {
ballId
pocketId
pathMetadataIndex
}
serializedShotPaths @include(if: $includePocketingIntentionFeatures) {
b64EncodedBuffer
}
...ShotWithAllFeatures
}
ids
}
}
# TODO: Delete
query GetShotsWithMetadata(
$filterInput: FilterInput!
$shotsPagination: GetShotsPagination
$limit: Int
$ids: [Int!]
) {
getShotsWithMetadata(
filterInput: $filterInput
shotsPagination: $shotsPagination
limit: $limit
ids: $ids
) {
count
shots {
...ShotWithAllFeatures
}
ids
}
}
query GetShotsByIds($ids: [Int!]!) {
getShotsByIds(ids: $ids) {
...ShotWithAllFeatures
}
}
@@ -89,12 +84,10 @@ fragment ShotWithAllFeatures on ShotGQL {
videoId
startFrame
endFrame
falsePositiveScore
createdAt
updatedAt
user {
id
}
falsePositiveScore
video {
id
stream {
@@ -104,6 +97,8 @@ fragment ShotWithAllFeatures on ShotGQL {
}
}
}
createdAt
updatedAt
cueObjectFeatures {
cueObjectDistance
cueObjectAngle
@@ -112,14 +107,19 @@ fragment ShotWithAllFeatures on ShotGQL {
spinType
}
pocketingIntentionFeatures {
targetPocketDistance
make
targetPocketDistance
targetPocketAngle
targetPocketAngleDirection
marginOfErrorInDegrees
intendedPocketType
}
}
query GetShotsByIds($ids: [Int!]!) {
getShotsByIds(ids: $ids) {
...ShotWithAllFeatures
pocketingIntentionInfo {
ballId
pocketId
pathMetadataIndex
}
serializedShotPaths {
b64EncodedBuffer
}
}

View File

@@ -237,3 +237,11 @@ query GetVideoForClipTimes($videoId: Int!) {
}
}
}
query GetHeaderInfoByVideoId($videoId: Int!) {
getVideo(videoId: $videoId) {
id
name
startTime
}
}

View File

@@ -11,6 +11,7 @@ type Query {
): [MakePercentageIntervalGQL!]!
getShotsWithMetadata(
filterInput: FilterInput!
ids: [Int!] = null
shotsPagination: GetShotsPagination = null
limit: Int! = 500
): GetShotsResult!
@@ -124,6 +125,7 @@ enum AlignedIntervalEnum {
MONTH
YEAR
WEEK
DAY
}
input FilterInput @oneOf {
@@ -139,6 +141,7 @@ input FilterInput @oneOf {
shotDirection: [ShotDirectionEnum!]
videoId: [Int!]
userId: [Int!]
username: [String!]
make: [Boolean!]
tags: [VideoTagInput!]
annotations: [ShotAnnotationInput!]
@@ -161,6 +164,7 @@ input FilterInput @oneOf {
targetPocketAngleDirection: [ShotDirectionEnum!]
targetPocketAngle: FloatRangeFilter
missAngleInDegrees: FloatRangeFilter
marginOfErrorInDegrees: FloatRangeFilter
createdAt: DateRangeFilter
}
@@ -281,6 +285,7 @@ type PocketingIntentionFeaturesGQL {
difficulty: Float
targetPocketAngle: Float
targetPocketAngleDirection: ShotDirectionEnum
marginOfErrorInDegrees: Float
backcut: Boolean
}