mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
do not select ID at directories and media, for proper old/new comparing
This commit is contained in:
@ -9,7 +9,7 @@ import com.simplemobiletools.gallery.models.Directory
|
|||||||
|
|
||||||
@Dao
|
@Dao
|
||||||
interface DirectoryDao {
|
interface DirectoryDao {
|
||||||
@Query("SELECT * FROM directories")
|
@Query("SELECT path, thumbnail, filename, media_count, last_modified, date_taken, size, is_on_sd_card FROM directories")
|
||||||
fun getAll(): List<Directory>
|
fun getAll(): List<Directory>
|
||||||
|
|
||||||
@Insert(onConflict = REPLACE)
|
@Insert(onConflict = REPLACE)
|
||||||
|
@ -11,7 +11,7 @@ interface MediumDao {
|
|||||||
@Query("SELECT * FROM media")
|
@Query("SELECT * FROM media")
|
||||||
fun getAll(): List<Medium>
|
fun getAll(): List<Medium>
|
||||||
|
|
||||||
@Query("SELECT * FROM media WHERE parent_path = :path")
|
@Query("SELECT filename, full_path, parent_path, last_modified, date_taken, size, type FROM media WHERE parent_path = :path")
|
||||||
fun getMediaFromPath(path: String): List<Medium>
|
fun getMediaFromPath(path: String): List<Medium>
|
||||||
|
|
||||||
@Insert(onConflict = REPLACE)
|
@Insert(onConflict = REPLACE)
|
||||||
|
Reference in New Issue
Block a user