mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2025-01-17 22:08:00 +01:00
convert last_modified to milliseconds at fetching
This commit is contained in:
parent
f034ad5786
commit
d906ffe59a
2 changed files with 12 additions and 12 deletions
|
@ -467,7 +467,7 @@ class MediaFetcher(val context: Context) {
|
|||
if (cursor.moveToFirst()) {
|
||||
do {
|
||||
try {
|
||||
val lastModified = cursor.getLongValue(Images.Media.DATE_MODIFIED)
|
||||
val lastModified = cursor.getLongValue(Images.Media.DATE_MODIFIED) * 1000
|
||||
if (lastModified != 0L) {
|
||||
val name = cursor.getStringValue(Images.Media.DISPLAY_NAME)
|
||||
lastModifieds["$folder/$name"] = lastModified
|
||||
|
|
|
@ -19,17 +19,17 @@ import java.util.*
|
|||
|
||||
@Entity(tableName = "media", indices = [(Index(value = ["full_path"], unique = true))])
|
||||
data class Medium(
|
||||
@PrimaryKey(autoGenerate = true) var id: Long?,
|
||||
@ColumnInfo(name = "filename") var name: String,
|
||||
@ColumnInfo(name = "full_path") var path: String,
|
||||
@ColumnInfo(name = "parent_path") var parentPath: String,
|
||||
@ColumnInfo(name = "last_modified") val modified: Long,
|
||||
@ColumnInfo(name = "date_taken") var taken: Long,
|
||||
@ColumnInfo(name = "size") val size: Long,
|
||||
@ColumnInfo(name = "type") val type: Int,
|
||||
@ColumnInfo(name = "video_duration") val videoDuration: Int,
|
||||
@ColumnInfo(name = "is_favorite") var isFavorite: Boolean,
|
||||
@ColumnInfo(name = "deleted_ts") var deletedTS: Long) : Serializable, ThumbnailItem() {
|
||||
@PrimaryKey(autoGenerate = true) var id: Long?,
|
||||
@ColumnInfo(name = "filename") var name: String,
|
||||
@ColumnInfo(name = "full_path") var path: String,
|
||||
@ColumnInfo(name = "parent_path") var parentPath: String,
|
||||
@ColumnInfo(name = "last_modified") val modified: Long,
|
||||
@ColumnInfo(name = "date_taken") var taken: Long,
|
||||
@ColumnInfo(name = "size") val size: Long,
|
||||
@ColumnInfo(name = "type") val type: Int,
|
||||
@ColumnInfo(name = "video_duration") val videoDuration: Int,
|
||||
@ColumnInfo(name = "is_favorite") var isFavorite: Boolean,
|
||||
@ColumnInfo(name = "deleted_ts") var deletedTS: Long) : Serializable, ThumbnailItem() {
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID = -6553149366975655L
|
||||
|
|
Loading…
Reference in a new issue