Add multiple genres to MediaFile
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/Masterminds/squirrel"
|
||||
"github.com/astaxie/beego/orm"
|
||||
"github.com/google/uuid"
|
||||
"github.com/navidrome/navidrome/log"
|
||||
@@ -149,6 +150,17 @@ var _ = Describe("MediaRepository", func() {
|
||||
Expect(mr.FindAllByPath(P("/music/overlap"))).To(HaveLen(1))
|
||||
})
|
||||
|
||||
It("filters by genre", func() {
|
||||
Expect(mr.GetAll(model.QueryOptions{
|
||||
Sort: "genre.name asc, title asc",
|
||||
Filters: squirrel.Eq{"genre.name": "Rock"},
|
||||
})).To(Equal(model.MediaFiles{
|
||||
songDayInALife,
|
||||
songAntenna,
|
||||
songComeTogether,
|
||||
}))
|
||||
})
|
||||
|
||||
Context("Annotations", func() {
|
||||
It("increments play count when the tracks does not have annotations", func() {
|
||||
id := "incplay.firsttime"
|
||||
|
||||
Reference in New Issue
Block a user