make the database favorite checker case insensitive

This commit is contained in:
tibbi 2019-06-11 22:59:14 +02:00
parent 12039bf4c5
commit f61979b6eb

View file

@ -21,7 +21,7 @@ interface MediumDao {
@Query("SELECT filename, full_path, parent_path, last_modified, date_taken, size, type, video_duration, is_favorite, deleted_ts FROM media WHERE deleted_ts != 0") @Query("SELECT filename, full_path, parent_path, last_modified, date_taken, size, type, video_duration, is_favorite, deleted_ts FROM media WHERE deleted_ts != 0")
fun getDeletedMedia(): List<Medium> fun getDeletedMedia(): List<Medium>
@Query("SELECT is_favorite FROM media WHERE full_path = :path") @Query("SELECT is_favorite FROM media WHERE full_path = :path COLLATE NOCASE")
fun isFavorite(path: String): Boolean fun isFavorite(path: String): Boolean
@Insert(onConflict = REPLACE) @Insert(onConflict = REPLACE)