@@ -122,8 +122,8 @@ object AndroidQDBUtils : IDBUtils {
122
122
val height = cursor.getInt(MediaStore .MediaColumns .HEIGHT )
123
123
val displayName = cursor.getString(MediaStore .Images .Media .DISPLAY_NAME )
124
124
val modifiedDate = cursor.getLong(MediaStore .MediaColumns .DATE_MODIFIED )
125
-
126
- val asset = AssetEntity (id, path, duration, date, width, height, getMediaType(type), displayName, modifiedDate)
125
+ val orientation : Int = cursor.getInt( MediaStore . MediaColumns . ORIENTATION )
126
+ val asset = AssetEntity (id, path, duration, date, width, height, getMediaType(type), displayName, modifiedDate, orientation )
127
127
list.add(asset)
128
128
cache.putAsset(asset)
129
129
}
@@ -176,8 +176,9 @@ object AndroidQDBUtils : IDBUtils {
176
176
val height = cursor.getInt(MediaStore .MediaColumns .HEIGHT )
177
177
val displayName = cursor.getString(MediaStore .Images .Media .DISPLAY_NAME )
178
178
val modifiedDate = cursor.getLong(MediaStore .MediaColumns .DATE_MODIFIED )
179
-
180
- val asset = AssetEntity (id, path, duration, date, width, height, getMediaType(type), displayName, modifiedDate)
179
+ val orientation: Int = cursor.getInt(MediaStore .MediaColumns .ORIENTATION )
180
+
181
+ val asset = AssetEntity (id, path, duration, date, width, height, getMediaType(type), displayName, modifiedDate, orientation)
181
182
list.add(asset)
182
183
cache.putAsset(asset)
183
184
}
@@ -212,8 +213,9 @@ object AndroidQDBUtils : IDBUtils {
212
213
val height = cursor.getInt(MediaStore .MediaColumns .HEIGHT )
213
214
val displayName = cursor.getString(MediaStore .MediaColumns .DISPLAY_NAME )
214
215
val modifiedDate = cursor.getLong(MediaStore .MediaColumns .DATE_MODIFIED )
215
-
216
- val dbAsset = AssetEntity (databaseId, path, duration, date, width, height, getMediaType(type), displayName, modifiedDate)
216
+ val orientation: Int = cursor.getInt(MediaStore .MediaColumns .ORIENTATION )
217
+
218
+ val dbAsset = AssetEntity (databaseId, path, duration, date, width, height, getMediaType(type), displayName, modifiedDate, orientation)
217
219
cacheContainer.putAsset(dbAsset)
218
220
219
221
cursor.close()
0 commit comments