diff --git a/engine/common.go b/engine/common.go index 0754876f7..47e47f9c0 100644 --- a/engine/common.go +++ b/engine/common.go @@ -4,7 +4,6 @@ import ( "context" "time" - "github.com/deluan/navidrome/consts" "github.com/deluan/navidrome/model" "github.com/deluan/navidrome/model/request" ) @@ -116,17 +115,6 @@ func FromMediaFile(mf *model.MediaFile) Entry { return e } -func realArtistName(mf *model.MediaFile) string { - switch { - case mf.Compilation: - return consts.VariousArtists - case mf.AlbumArtist != "": - return mf.AlbumArtist - } - - return mf.Artist -} - func FromAlbums(albums model.Albums) Entries { entries := make(Entries, len(albums)) for i := range albums { diff --git a/persistence/playqueue_repository.go b/persistence/playqueue_repository.go index 5389e46b2..b178b0e86 100644 --- a/persistence/playqueue_repository.go +++ b/persistence/playqueue_repository.go @@ -13,7 +13,6 @@ import ( type playQueueRepository struct { sqlRepository - sqlRestful } func NewPlayQueueRepository(ctx context.Context, o orm.Ormer) model.PlayQueueRepository { @@ -62,7 +61,6 @@ func (r *playQueueRepository) Retrieve(userId string) (*model.PlayQueue, error) err := r.queryOne(sel, &res) pls := r.toModel(&res) return &pls, err - } func (r *playQueueRepository) fromModel(q *model.PlayQueue) playQueue { diff --git a/server/subsonic/helpers.go b/server/subsonic/helpers.go index 1d82cedfb..c4051ac33 100644 --- a/server/subsonic/helpers.go +++ b/server/subsonic/helpers.go @@ -165,7 +165,7 @@ func getTranscoding(ctx context.Context) (format string, bitRate int) { // This seems to be duplicated, but it is an initial step into merging `engine` and the `subsonic` packages, // In the future there won't be any conversion to/from `engine. Entry` anymore -func ChildFromMediaFile(ctx context.Context, mf *model.MediaFile) responses.Child { +func ChildFromMediaFile(ctx context.Context, mf model.MediaFile) responses.Child { child := responses.Child{} child.Id = mf.ID child.Title = mf.Title @@ -209,7 +209,7 @@ func ChildFromMediaFile(ctx context.Context, mf *model.MediaFile) responses.Chil func ChildrenFromMediaFiles(ctx context.Context, mfs model.MediaFiles) []responses.Child { children := make([]responses.Child, len(mfs)) for i, mf := range mfs { - children[i] = ChildFromMediaFile(ctx, &mf) + children[i] = ChildFromMediaFile(ctx, mf) } return children }