@takeoffmedia/react-native-penthera 0.2.57 → 0.2.58

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.
@@ -168,7 +168,6 @@ class OfflineVideoEngine(private val context: ReactApplicationContext) {
168
168
  val columnNames = cursor?.columnNames
169
169
 
170
170
  while (cursor?.moveToNext() == true && columnNames != null) {
171
- val assetManager = virtuoso.assetManager
172
171
  val dataMap = mutableMapOf<String, Any>()
173
172
  var eap = ""
174
173
  var ead = ""
@@ -204,6 +203,11 @@ class OfflineVideoEngine(private val context: ReactApplicationContext) {
204
203
  if (columnName == "eap") {
205
204
  eap = value
206
205
  }
206
+ if(columnName == "activePercentOfDownloads"){
207
+ val percentage = value.toDouble() * 100
208
+ val isComplete = percentage == 100.0
209
+ dataMap["isCompleted"] = isComplete
210
+ }
207
211
  if (columnName == "firstPlayTime") {
208
212
  var eadFormated = dateToString(ead)
209
213
  var eapFormated = dateToString(eap)
@@ -214,7 +218,6 @@ class OfflineVideoEngine(private val context: ReactApplicationContext) {
214
218
 
215
219
  }
216
220
  }
217
- dataMap["isCompleted"] = dataMap["currentSize"] == dataMap["expectedSize"]
218
221
  dataMap["isPaused"] = false
219
222
  completedList.add(dataMap)
220
223
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takeoffmedia/react-native-penthera",
3
- "version": "0.2.57",
3
+ "version": "0.2.58",
4
4
  "description": "test",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",