refactor: drop search table, integrated full_text into main tables

This commit is contained in:
Deluan 2020-03-19 21:43:30 -04:00
parent 8cdd4e317d
commit 32fbf2e9eb
10 changed files with 62 additions and 67 deletions

View file

@ -37,11 +37,9 @@ func (r mediaFileRepository) Exists(id string) (bool, error) {
}
func (r mediaFileRepository) Put(m *model.MediaFile) error {
m.FullText = r.getFullText(m.Title, m.Album, m.Artist, m.AlbumArtist)
_, err := r.put(m.ID, m)
if err != nil {
return err
}
return r.index(m.ID, m.Title, m.Album, m.Artist, m.AlbumArtist)
return err
}
func (r mediaFileRepository) selectMediaFile(options ...model.QueryOptions) SelectBuilder {