mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-02 02:13:33 +00:00
Fix bug in image visualization
This commit is contained in:
parent
a0f417fa94
commit
18fae806a6
36 changed files with 431 additions and 150 deletions
|
|
@ -37,6 +37,9 @@ public interface AlbumDao {
|
|||
@Delete
|
||||
void delete(Album album);
|
||||
|
||||
@Query("SELECT title FROM album WHERE title LIKE :query || '%' GROUP BY title LIMIT :number")
|
||||
@Query("SELECT title FROM album WHERE title LIKE :query || '%' OR title like '% ' || :query || '%' GROUP BY title LIMIT :number")
|
||||
List<String> searchSuggestions(String query, int number);
|
||||
|
||||
@Query("DELETE FROM album")
|
||||
void deleteAll();
|
||||
}
|
||||
|
|
@ -34,6 +34,9 @@ public interface ArtistDao {
|
|||
@Delete
|
||||
void delete(Artist artist);
|
||||
|
||||
@Query("SELECT name FROM artist WHERE name LIKE :query || '%' GROUP BY name LIMIT :number")
|
||||
@Query("SELECT name FROM artist WHERE name LIKE :query || '%' OR name like '% ' || :query || '%' GROUP BY name LIMIT :number")
|
||||
List<String> searchSuggestions(String query, int number);
|
||||
|
||||
@Query("DELETE FROM artist")
|
||||
void deleteAll();
|
||||
}
|
||||
|
|
@ -7,8 +7,6 @@ import androidx.room.Insert;
|
|||
import androidx.room.OnConflictStrategy;
|
||||
import androidx.room.Query;
|
||||
|
||||
import com.cappielloantonio.play.model.Album;
|
||||
import com.cappielloantonio.play.model.Artist;
|
||||
import com.cappielloantonio.play.model.Genre;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -35,4 +33,7 @@ public interface GenreDao {
|
|||
|
||||
@Delete
|
||||
void delete(Genre genre);
|
||||
|
||||
@Query("DELETE FROM genre")
|
||||
void deleteAll();
|
||||
}
|
||||
|
|
@ -7,7 +7,6 @@ import androidx.room.Insert;
|
|||
import androidx.room.OnConflictStrategy;
|
||||
import androidx.room.Query;
|
||||
|
||||
import com.cappielloantonio.play.model.Artist;
|
||||
import com.cappielloantonio.play.model.Playlist;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -28,4 +27,7 @@ public interface PlaylistDao {
|
|||
|
||||
@Delete
|
||||
void delete(Playlist playlist);
|
||||
|
||||
@Query("DELETE FROM playlist")
|
||||
void deleteAll();
|
||||
}
|
||||
|
|
@ -18,6 +18,9 @@ public interface SongDao {
|
|||
@Query("SELECT * FROM song")
|
||||
LiveData<List<Song>> getAll();
|
||||
|
||||
@Query("SELECT * FROM song")
|
||||
List<Song> getAllList();
|
||||
|
||||
@Query("SELECT * FROM song WHERE title LIKE '%' || :title || '%'")
|
||||
LiveData<List<Song>> searchSong(String title);
|
||||
|
||||
|
|
@ -60,12 +63,15 @@ public interface SongDao {
|
|||
@Delete
|
||||
void delete(Song song);
|
||||
|
||||
@Query("DELETE FROM song")
|
||||
void deleteAll();
|
||||
|
||||
@Update
|
||||
public void update(Song song);
|
||||
|
||||
@Query("SELECT * FROM song ORDER BY RANDOM() LIMIT :number")
|
||||
List<Song> random(int number);
|
||||
|
||||
@Query("SELECT title FROM song WHERE title LIKE :query || '%' GROUP BY title LIMIT :number")
|
||||
@Query("SELECT title FROM song WHERE title LIKE :query || '%' OR title like '% ' || :query || '%' GROUP BY title LIMIT :number")
|
||||
List<String> searchSuggestions(String query, int number);
|
||||
}
|
||||
|
|
@ -8,7 +8,6 @@ import androidx.room.OnConflictStrategy;
|
|||
import androidx.room.Query;
|
||||
import androidx.room.Update;
|
||||
|
||||
import com.cappielloantonio.play.model.Song;
|
||||
import com.cappielloantonio.play.model.SongGenreCross;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -32,4 +31,7 @@ public interface SongGenreCrossDao {
|
|||
|
||||
@Update
|
||||
void update(SongGenreCross songGenreCross);
|
||||
|
||||
@Query("DELETE FROM song_genre_cross")
|
||||
void deleteAll();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue