* Builds the deferred listing stub for a recording. Content is fetched lazily in * getDocument; only metadata and the change hash are computed here.
(recording: GrainRecording)
| 235 | * getDocument; only metadata and the change hash are computed here. |
| 236 | */ |
| 237 | function recordingToStub(recording: GrainRecording): ExternalDocument { |
| 238 | return { |
| 239 | externalId: recordingId(recording), |
| 240 | title: recordingTitle(recording), |
| 241 | content: '', |
| 242 | contentDeferred: true, |
| 243 | mimeType: 'text/plain', |
| 244 | sourceUrl: recording.url || undefined, |
| 245 | contentHash: buildContentHash(recording), |
| 246 | metadata: buildMetadata(recording), |
| 247 | } |
| 248 | } |
| 249 | |
| 250 | /** |
| 251 | * Formats a recording header plus speaker-attributed transcript lines into plain text. |
no test coverage detected