removing the favorite paths getting function from MediumDao

This commit is contained in:
tibbi 2020-01-25 09:39:56 +01:00
parent a7b7881d73
commit 61c4db155d
2 changed files with 1 additions and 4 deletions

View File

@ -712,7 +712,7 @@ fun Context.getOTGFolderChildrenNames(path: String) = getOTGFolderChildren(path)
fun Context.getFavoritePaths(): ArrayList<String> { fun Context.getFavoritePaths(): ArrayList<String> {
return try { return try {
galleryDB.MediumDao().getFavoritePaths() as ArrayList<String> galleryDB.FavoritesDAO().getValidFavoritePaths() as ArrayList<String>
} catch (e: Exception) { } catch (e: Exception) {
ArrayList() ArrayList()
} }

View File

@ -15,9 +15,6 @@ 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 AND is_favorite = 1") @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 AND is_favorite = 1")
fun getFavorites(): List<Medium> fun getFavorites(): List<Medium>
@Query("SELECT full_path FROM media WHERE deleted_ts = 0 AND is_favorite = 1")
fun getFavoritePaths(): List<String>
@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>