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.db.obj.DownloadItem
|
||||||
import com.github.libretube.enums.FileType
|
import com.github.libretube.enums.FileType
|
||||||
|
import com.github.libretube.extensions.toMillis
|
||||||
import com.github.libretube.helpers.ProxyHelper
|
import com.github.libretube.helpers.ProxyHelper
|
||||||
import com.github.libretube.parcelable.DownloadData
|
import com.github.libretube.parcelable.DownloadData
|
||||||
import kotlin.io.path.Path
|
import kotlin.io.path.Path
|
||||||
@ -84,7 +85,7 @@ data class Streams(
|
|||||||
uploaderUrl = uploaderUrl,
|
uploaderUrl = uploaderUrl,
|
||||||
uploaderAvatar = uploaderAvatar,
|
uploaderAvatar = uploaderAvatar,
|
||||||
uploadedDate = uploadDate.toString(),
|
uploadedDate = uploadDate.toString(),
|
||||||
uploaded = null,
|
uploaded = uploadDate.toMillis(),
|
||||||
duration = duration,
|
duration = duration,
|
||||||
views = views,
|
views = views,
|
||||||
uploaderVerified = uploaderVerified,
|
uploaderVerified = uploaderVerified,
|
||||||
|
@ -29,9 +29,10 @@ object DatabaseHelper {
|
|||||||
videoId,
|
videoId,
|
||||||
stream.title,
|
stream.title,
|
||||||
stream.uploaded?.let {
|
stream.uploaded?.let {
|
||||||
Instant.ofEpochMilli(
|
Instant.ofEpochMilli(it)
|
||||||
it
|
.atZone(ZoneId.systemDefault())
|
||||||
).atZone(ZoneId.systemDefault()).toLocalDate().toKotlinLocalDate()
|
.toLocalDate()
|
||||||
|
.toKotlinLocalDate()
|
||||||
},
|
},
|
||||||
stream.uploaderName,
|
stream.uploaderName,
|
||||||
stream.uploaderUrl?.toID(),
|
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.IntentData
|
||||||
import com.github.libretube.constants.PLAYER_CHANNEL_ID
|
import com.github.libretube.constants.PLAYER_CHANNEL_ID
|
||||||
import com.github.libretube.constants.PLAYER_NOTIFICATION_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.DatabaseHolder.Database
|
||||||
import com.github.libretube.db.obj.WatchPosition
|
import com.github.libretube.db.obj.WatchPosition
|
||||||
import com.github.libretube.extensions.parcelableExtra
|
import com.github.libretube.extensions.parcelableExtra
|
||||||
|
Loading…
Reference in New Issue
Block a user