mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 06:10:31 +05:30
Merge pull request #4735 from Bnyro/master
fix: video upload date not saved to watch history
This commit is contained in:
commit
2ef4dd7df8
@ -2,6 +2,7 @@ package com.github.libretube.api.obj
|
||||
|
||||
import com.github.libretube.db.obj.DownloadItem
|
||||
import com.github.libretube.enums.FileType
|
||||
import com.github.libretube.extensions.toMillis
|
||||
import com.github.libretube.helpers.ProxyHelper
|
||||
import com.github.libretube.parcelable.DownloadData
|
||||
import kotlin.io.path.Path
|
||||
@ -84,7 +85,7 @@ data class Streams(
|
||||
uploaderUrl = uploaderUrl,
|
||||
uploaderAvatar = uploaderAvatar,
|
||||
uploadedDate = uploadDate.toString(),
|
||||
uploaded = null,
|
||||
uploaded = uploadDate.toMillis(),
|
||||
duration = duration,
|
||||
views = views,
|
||||
uploaderVerified = uploaderVerified,
|
||||
|
@ -29,9 +29,10 @@ object DatabaseHelper {
|
||||
videoId,
|
||||
stream.title,
|
||||
stream.uploaded?.let {
|
||||
Instant.ofEpochMilli(
|
||||
it
|
||||
).atZone(ZoneId.systemDefault()).toLocalDate().toKotlinLocalDate()
|
||||
Instant.ofEpochMilli(it)
|
||||
.atZone(ZoneId.systemDefault())
|
||||
.toLocalDate()
|
||||
.toKotlinLocalDate()
|
||||
},
|
||||
stream.uploaderName,
|
||||
stream.uploaderUrl?.toID(),
|
||||
|
@ -27,6 +27,7 @@ import com.github.libretube.api.obj.Streams
|
||||
import com.github.libretube.constants.IntentData
|
||||
import com.github.libretube.constants.PLAYER_CHANNEL_ID
|
||||
import com.github.libretube.constants.PLAYER_NOTIFICATION_ID
|
||||
import com.github.libretube.db.DatabaseHelper
|
||||
import com.github.libretube.db.DatabaseHolder.Database
|
||||
import com.github.libretube.db.obj.WatchPosition
|
||||
import com.github.libretube.extensions.parcelableExtra
|
||||
|
Loading…
Reference in New Issue
Block a user