mirror of
https://github.com/navidrome/navidrome.git
synced 2026-05-03 06:51:16 +00:00
refactor(smartplaylist): remove unused 'value' field and clarify 'random' usage
Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
parent
0fd9c6df2e
commit
57fc85f434
@ -88,8 +88,8 @@ var fieldMap = map[string]FieldInfo{
|
||||
// Backward compatibility: albumtype is an alias for the releasetype tag.
|
||||
"albumtype": {Alias: "releasetype", IsTag: true},
|
||||
|
||||
// Pseudo-field for random sorting
|
||||
"random": {},
|
||||
"value": {},
|
||||
}
|
||||
|
||||
// AllFieldNames returns the names of all registered criteria fields.
|
||||
|
||||
@ -22,13 +22,6 @@ var _ = Describe("fields", func() {
|
||||
gomega.Expect(field.IsTag).To(gomega.BeTrue())
|
||||
})
|
||||
|
||||
It("finds special fields", func() {
|
||||
field, ok := LookupField("value")
|
||||
|
||||
gomega.Expect(ok).To(gomega.BeTrue())
|
||||
gomega.Expect(field.Name()).To(gomega.Equal("value"))
|
||||
})
|
||||
|
||||
It("finds registered tag names", func() {
|
||||
AddTagNames([]string{"task3_mood"})
|
||||
|
||||
|
||||
@ -117,7 +117,6 @@ var smartPlaylistFields = map[string]smartPlaylistField{
|
||||
"rgtrackpeak": {expr: "media_file.rg_track_peak"},
|
||||
"library_id": {expr: "media_file.library_id"},
|
||||
"random": {order: "random()"},
|
||||
"value": {expr: "value"},
|
||||
}
|
||||
|
||||
func (c smartPlaylistCriteria) Where() (squirrel.Sqlizer, error) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user