mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-17 04:22:23 +03:00
Fix lint errors
This commit is contained in:
parent
338cbacb79
commit
3d4f4b4e2b
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user