Fix get song by id

This commit is contained in:
Deluan 2021-07-24 18:54:22 -04:00
parent 7bd506accc
commit 5b81f7a73a
1 changed files with 2 additions and 1 deletions

View File

@ -31,6 +31,7 @@ func NewMediaFileRepository(ctx context.Context, o orm.Ormer) *mediaFileReposito
"random": "RANDOM()",
}
r.filterMappings = map[string]filterFunc{
"id": idFilter(r.tableName),
"title": fullTextFilter,
"starred": booleanFilter,
}
@ -44,7 +45,7 @@ func (r *mediaFileRepository) CountAll(options ...model.QueryOptions) (int64, er
}
func (r *mediaFileRepository) Exists(id string) (bool, error) {
return r.exists(Select().Where(Eq{"id": id}))
return r.exists(Select().Where(Eq{"media_file.id": id}))
}
func (r *mediaFileRepository) Put(m *model.MediaFile) error {