Skip to content

Commit 601b39f

Browse files
authored
Merge pull request #1658 from joreilly/youtube
add support for recordingUrl
2 parents 914dc0a + 87c211d commit 601b39f

File tree

7 files changed

+13
-5
lines changed

7 files changed

+13
-5
lines changed

backend/datastore/src/jvmMain/kotlin/dev/johnoreilly/confetti/backend/datastore/DataStore.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,8 @@ class DataStore {
406406
speakers = getList<StringValue>("speakers").map { it.get() },
407407
links = getListOrNull<StringValue>("links").orEmpty().map {
408408
Json.parseToJsonElement(it.get()).toAny().asMap.toLink()
409-
}
409+
},
410+
recordingUrl = getStringOrNull("recordingUrl"),
410411
)
411412
}
412413

backend/datastore/src/jvmMain/kotlin/dev/johnoreilly/confetti/backend/datastore/model.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ data class DSession(
1717
val tags: List<String>,
1818
val rooms: List<String>,
1919
val speakers: List<String>,
20-
val links: List<DLink>
20+
val links: List<DLink>,
21+
val recordingUrl: String? = null,
2122
)
2223

2324
class DRoom(

backend/service-graphql/src/main/kotlin/dev/johnoreilly/confetti/backend/graphql/DataStoreDataSource.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@ class DataStoreDataSource(private val conf: String, private val uid: String? = n
183183
LinkType.Other
184184
}, url = it.url
185185
)
186-
}
186+
},
187+
recordingUrl = recordingUrl
187188
)
188189
}
189190

backend/service-graphql/src/main/kotlin/dev/johnoreilly/confetti/backend/graphql/TestDataSource.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ class TestDataSource : DataSource {
7474
complexity = null,
7575
feedbackId = null,
7676
type = "talk",
77-
links = emptyList()
77+
links = emptyList(),
78+
recordingUrl = null
7879
)
7980
},
8081
pageInfo = PageInfo(

backend/service-graphql/src/main/kotlin/dev/johnoreilly/confetti/backend/graphql/model.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,8 @@ data class Session(
312312
* One of "break", "lunch", "party", "keynote", "talk" or any other conference-specific format.
313313
*/
314314
val type: String,
315-
val links: List<Link>
315+
val links: List<Link>,
316+
val recordingUrl: String?,
316317
) {
317318
fun speakers(dfe: ExecutionContext): List<Speaker> {
318319
return dfe.source().speakers(speakerIds.toList())

backend/service-import/src/jvmMain/kotlin/dev/johnoreilly/confetti/backend/import/Sessionize.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,6 +1045,7 @@ object Sessionize {
10451045
speakers = it.get("speakers").asList.map { it.asString },
10461046
shortDescription = null,
10471047
links = linksFor(it.get("id").asString),
1048+
recordingUrl = it.get("recordingUrl")?.asString,
10481049
)
10491050
}
10501051
}

shared/src/commonMain/graphql/schema.graphqls

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,8 @@ type Session {
181181

182182
links: [Link!]!
183183

184+
recordingUrl: String
185+
184186
speakers: [Speaker!]!
185187

186188
room: Room

0 commit comments

Comments
 (0)