musora-content-services 1.0.154 → 1.0.155
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 +2 -0
- package/package.json +1 -1
- package/src/index.d.ts +0 -4
- package/src/index.js +0 -4
- package/src/services/contentProgress.js +0 -20
- package/src/services/railcontent.js +0 -5
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
|
+
### [1.0.155](https://github.com/railroadmedia/musora-content-services/compare/v1.0.154...v1.0.155) (2024-11-05)
|
|
6
|
+
|
|
5
7
|
### [1.0.154](https://github.com/railroadmedia/musora-content-services/compare/v1.0.153...v1.0.154) (2024-11-05)
|
|
6
8
|
|
|
7
9
|
### [1.0.153](https://github.com/railroadmedia/musora-content-services/compare/v1.0.152...v1.0.153) (2024-11-05)
|
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -14,7 +14,6 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
contentStatusCompleted,
|
|
16
16
|
contentStatusReset,
|
|
17
|
-
contentStatusStarted,
|
|
18
17
|
getProgressPercentage,
|
|
19
18
|
getProgressPercentageByIds,
|
|
20
19
|
getProgressState,
|
|
@@ -59,7 +58,6 @@ import {
|
|
|
59
58
|
postContentCompleted,
|
|
60
59
|
postContentLiked,
|
|
61
60
|
postContentReset,
|
|
62
|
-
postContentStarted,
|
|
63
61
|
postContentUnliked,
|
|
64
62
|
postRecordWatchSession,
|
|
65
63
|
updatePlaylist,
|
|
@@ -120,7 +118,6 @@ declare module 'musora-content-services' {
|
|
|
120
118
|
export {
|
|
121
119
|
contentStatusCompleted,
|
|
122
120
|
contentStatusReset,
|
|
123
|
-
contentStatusStarted,
|
|
124
121
|
createPlaylist,
|
|
125
122
|
deletePlaylist,
|
|
126
123
|
deletePlaylistItem,
|
|
@@ -212,7 +209,6 @@ declare module 'musora-content-services' {
|
|
|
212
209
|
postContentCompleted,
|
|
213
210
|
postContentLiked,
|
|
214
211
|
postContentReset,
|
|
215
|
-
postContentStarted,
|
|
216
212
|
postContentUnliked,
|
|
217
213
|
postRecordWatchSession,
|
|
218
214
|
recordWatchSession,
|
package/src/index.js
CHANGED
|
@@ -14,7 +14,6 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
contentStatusCompleted,
|
|
16
16
|
contentStatusReset,
|
|
17
|
-
contentStatusStarted,
|
|
18
17
|
getProgressPercentage,
|
|
19
18
|
getProgressPercentageByIds,
|
|
20
19
|
getProgressState,
|
|
@@ -59,7 +58,6 @@ import {
|
|
|
59
58
|
postContentCompleted,
|
|
60
59
|
postContentLiked,
|
|
61
60
|
postContentReset,
|
|
62
|
-
postContentStarted,
|
|
63
61
|
postContentUnliked,
|
|
64
62
|
postRecordWatchSession,
|
|
65
63
|
updatePlaylist,
|
|
@@ -119,7 +117,6 @@ import {
|
|
|
119
117
|
export {
|
|
120
118
|
contentStatusCompleted,
|
|
121
119
|
contentStatusReset,
|
|
122
|
-
contentStatusStarted,
|
|
123
120
|
createPlaylist,
|
|
124
121
|
deletePlaylist,
|
|
125
122
|
deletePlaylistItem,
|
|
@@ -211,7 +208,6 @@ export {
|
|
|
211
208
|
postContentCompleted,
|
|
212
209
|
postContentLiked,
|
|
213
210
|
postContentReset,
|
|
214
|
-
postContentStarted,
|
|
215
211
|
postContentUnliked,
|
|
216
212
|
postRecordWatchSession,
|
|
217
213
|
recordWatchSession,
|
|
@@ -48,26 +48,6 @@ export async function getResumeTimeSeconds(contentId) {
|
|
|
48
48
|
return data[contentId]?.[DATA_KEY_RESUME_TIME] ?? 0;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
export async function contentStatusStarted(contentId) {
|
|
52
|
-
await dataContext.update(
|
|
53
|
-
function (localContext) {
|
|
54
|
-
let data = localContext.data[contentId] ?? [];
|
|
55
|
-
let progress = data?.[DATA_KEY_PROGRESS] ?? 0;
|
|
56
|
-
let status = data?.[DATA_KEY_STATUS] ?? 0;
|
|
57
|
-
|
|
58
|
-
if (status !== STATE_COMPLETED && progress !== 100) {
|
|
59
|
-
status = STATE_STARTED;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
data[DATA_KEY_STATUS] = status;
|
|
63
|
-
localContext.data[contentId] = data;
|
|
64
|
-
},
|
|
65
|
-
async function () {
|
|
66
|
-
return postContentStarted(contentId);
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
51
|
export async function contentStatusCompleted(contentId) {
|
|
72
52
|
await dataContext.update(
|
|
73
53
|
function (localContext) {
|
|
@@ -823,11 +823,6 @@ export async function fetchPlaylistItem(payload) {
|
|
|
823
823
|
return await fetchHandler(url);
|
|
824
824
|
}
|
|
825
825
|
|
|
826
|
-
export async function postContentStarted(contentId) {
|
|
827
|
-
let url = `/content/${contentId}/started`;
|
|
828
|
-
return postDataHandler(url);
|
|
829
|
-
}
|
|
830
|
-
|
|
831
826
|
export async function postContentCompleted(contentId) {
|
|
832
827
|
let url = `/content/${contentId}/completed`;
|
|
833
828
|
return postDataHandler(url);
|