musora-content-services 2.5.0 → 2.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [2.5.1](https://github.com/railroadmedia/musora-content-services/compare/v2.5.0...v2.5.1) (2025-05-16)
6
+
5
7
  ## [2.5.0](https://github.com/railroadmedia/musora-content-services/compare/v2.4.0...v2.5.0) (2025-05-16)
6
8
 
7
9
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musora-content-services",
3
- "version": "2.5.0",
3
+ "version": "2.5.1",
4
4
  "description": "A package for Musoras content services ",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -6,6 +6,7 @@ import {
6
6
  } from './railcontent.js'
7
7
  import { DataContext, ContentProgressVersionKey } from './dataContext.js'
8
8
  import { fetchHierarchy } from './sanity.js'
9
+ import {recordUserPractice} from "./userActivity";
9
10
 
10
11
  const STATE_STARTED = 'started'
11
12
  const STATE_COMPLETED = 'completed'
@@ -250,6 +251,14 @@ export async function recordWatchSession(
250
251
  if (!sessionId) {
251
252
  sessionId = uuidv4()
252
253
  }
254
+
255
+ await recordUserPractice({ content_id: contentId, duration_seconds: secondsPlayed })
256
+ try {
257
+ await recordUserPractice({ content_id: contentId, duration_seconds: secondsPlayed })
258
+ } catch (error) {
259
+ console.error('Failed to record user practice:', error)
260
+ }
261
+
253
262
  await dataContext.update(
254
263
  async function (localContext) {
255
264
  if (contentId && updateLocalProgress) {
File without changes
File without changes