mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-01 19:47:37 +03:00
chore: remove some BFR-related TODOs that are not valid anymore
Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
parent
57e0f6d3ea
commit
223e88d481
12 changed files with 6 additions and 20 deletions
|
@ -306,7 +306,6 @@ func Load(noConfigDump bool) {
|
||||||
disableExternalServices()
|
disableExternalServices()
|
||||||
}
|
}
|
||||||
|
|
||||||
// BFR Remove before release
|
|
||||||
if Server.Scanner.Extractor != consts.DefaultScannerExtractor {
|
if Server.Scanner.Extractor != consts.DefaultScannerExtractor {
|
||||||
log.Warn(fmt.Sprintf("Extractor '%s' is not implemented, using 'taglib'", Server.Scanner.Extractor))
|
log.Warn(fmt.Sprintf("Extractor '%s' is not implemented, using 'taglib'", Server.Scanner.Extractor))
|
||||||
Server.Scanner.Extractor = consts.DefaultScannerExtractor
|
Server.Scanner.Extractor = consts.DefaultScannerExtractor
|
||||||
|
|
|
@ -15,7 +15,7 @@ import (
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
)
|
)
|
||||||
|
|
||||||
// BFR Fix tests
|
// TODO Fix tests
|
||||||
var _ = XDescribe("Artwork", func() {
|
var _ = XDescribe("Artwork", func() {
|
||||||
var aw *artwork
|
var aw *artwork
|
||||||
var ds model.DataStore
|
var ds model.DataStore
|
||||||
|
|
|
@ -239,7 +239,6 @@ func (f *fakeScrobbler) Scrobble(ctx context.Context, userId string, s Scrobble)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// BFR This is duplicated in a few places
|
|
||||||
func _p(id, name string, sortName ...string) model.Participant {
|
func _p(id, name string, sortName ...string) model.Participant {
|
||||||
p := model.Participant{Artist: model.Artist{ID: id, Name: name}}
|
p := model.Participant{Artist: model.Artist{ID: id, Name: name}}
|
||||||
if len(sortName) > 0 {
|
if len(sortName) > 0 {
|
||||||
|
|
|
@ -17,7 +17,7 @@ type Album struct {
|
||||||
Name string `structs:"name" json:"name"`
|
Name string `structs:"name" json:"name"`
|
||||||
EmbedArtPath string `structs:"embed_art_path" json:"-"`
|
EmbedArtPath string `structs:"embed_art_path" json:"-"`
|
||||||
AlbumArtistID string `structs:"album_artist_id" json:"albumArtistId"` // Deprecated, use Participants
|
AlbumArtistID string `structs:"album_artist_id" json:"albumArtistId"` // Deprecated, use Participants
|
||||||
// BFR Rename to AlbumArtistDisplayName
|
// AlbumArtist is the display name used for the album artist.
|
||||||
AlbumArtist string `structs:"album_artist" json:"albumArtist"`
|
AlbumArtist string `structs:"album_artist" json:"albumArtist"`
|
||||||
MaxYear int `structs:"max_year" json:"maxYear"`
|
MaxYear int `structs:"max_year" json:"maxYear"`
|
||||||
MinYear int `structs:"min_year" json:"minYear"`
|
MinYear int `structs:"min_year" json:"minYear"`
|
||||||
|
|
|
@ -31,10 +31,10 @@ type MediaFile struct {
|
||||||
Title string `structs:"title" json:"title"`
|
Title string `structs:"title" json:"title"`
|
||||||
Album string `structs:"album" json:"album"`
|
Album string `structs:"album" json:"album"`
|
||||||
ArtistID string `structs:"artist_id" json:"artistId"` // Deprecated: Use Participants instead
|
ArtistID string `structs:"artist_id" json:"artistId"` // Deprecated: Use Participants instead
|
||||||
// BFR Rename to ArtistDisplayName
|
// Artist is the display name used for the artist.
|
||||||
Artist string `structs:"artist" json:"artist"`
|
Artist string `structs:"artist" json:"artist"`
|
||||||
AlbumArtistID string `structs:"album_artist_id" json:"albumArtistId"` // Deprecated: Use Participants instead
|
AlbumArtistID string `structs:"album_artist_id" json:"albumArtistId"` // Deprecated: Use Participants instead
|
||||||
// BFR Rename to AlbumArtistDisplayName
|
// AlbumArtist is the display name used for the album artist.
|
||||||
AlbumArtist string `structs:"album_artist" json:"albumArtist"`
|
AlbumArtist string `structs:"album_artist" json:"albumArtist"`
|
||||||
AlbumID string `structs:"album_id" json:"albumId"`
|
AlbumID string `structs:"album_id" json:"albumId"`
|
||||||
HasCoverArt bool `structs:"has_cover_art" json:"hasCoverArt"`
|
HasCoverArt bool `structs:"has_cover_art" json:"hasCoverArt"`
|
||||||
|
|
|
@ -184,7 +184,6 @@ func allRolesFilter(_ string, value interface{}) Sqlizer {
|
||||||
func (r *albumRepository) CountAll(options ...model.QueryOptions) (int64, error) {
|
func (r *albumRepository) CountAll(options ...model.QueryOptions) (int64, error) {
|
||||||
sql := r.newSelect()
|
sql := r.newSelect()
|
||||||
sql = r.withAnnotation(sql, "album.id")
|
sql = r.withAnnotation(sql, "album.id")
|
||||||
// BFR WithParticipants (for filtering by name)?
|
|
||||||
return r.count(sql, options...)
|
return r.count(sql, options...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ func (a *dbArtist) PostMapArgs(m map[string]any) error {
|
||||||
m["full_text"] = formatFullText(a.Name, a.SortArtistName)
|
m["full_text"] = formatFullText(a.Name, a.SortArtistName)
|
||||||
|
|
||||||
// Do not override the sort_artist_name and mbz_artist_id fields if they are empty
|
// Do not override the sort_artist_name and mbz_artist_id fields if they are empty
|
||||||
// BFR: Better way to handle this?
|
// TODO: Better way to handle this?
|
||||||
if v, ok := m["sort_artist_name"]; !ok || v.(string) == "" {
|
if v, ok := m["sort_artist_name"]; !ok || v.(string) == "" {
|
||||||
delete(m, "sort_artist_name")
|
delete(m, "sort_artist_name")
|
||||||
}
|
}
|
||||||
|
@ -134,7 +134,6 @@ func roleFilter(_ string, role any) Sqlizer {
|
||||||
func (r *artistRepository) selectArtist(options ...model.QueryOptions) SelectBuilder {
|
func (r *artistRepository) selectArtist(options ...model.QueryOptions) SelectBuilder {
|
||||||
query := r.newSelect(options...).Columns("artist.*")
|
query := r.newSelect(options...).Columns("artist.*")
|
||||||
query = r.withAnnotation(query, "artist.id")
|
query = r.withAnnotation(query, "artist.id")
|
||||||
// BFR How to handle counts and sizes (per role)?
|
|
||||||
return query
|
return query
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,6 @@ var mediaFileFilter = sync.OnceValue(func() map[string]filterFunc {
|
||||||
func (r *mediaFileRepository) CountAll(options ...model.QueryOptions) (int64, error) {
|
func (r *mediaFileRepository) CountAll(options ...model.QueryOptions) (int64, error) {
|
||||||
query := r.newSelect()
|
query := r.newSelect()
|
||||||
query = r.withAnnotation(query, "media_file.id")
|
query = r.withAnnotation(query, "media_file.id")
|
||||||
// BFR WithParticipants (for filtering by name)?
|
|
||||||
return r.count(query, options...)
|
return r.count(query, options...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,13 +29,6 @@ func TestPersistence(t *testing.T) {
|
||||||
RunSpecs(t, "Persistence Suite")
|
RunSpecs(t, "Persistence Suite")
|
||||||
}
|
}
|
||||||
|
|
||||||
// BFR Test tags
|
|
||||||
//var (
|
|
||||||
// genreElectronic = model.Genre{ID: "gn-1", Name: "Electronic"}
|
|
||||||
// genreRock = model.Genre{ID: "gn-2", Name: "Rock"}
|
|
||||||
// testGenres = model.Genres{genreElectronic, genreRock}
|
|
||||||
//)
|
|
||||||
|
|
||||||
func mf(mf model.MediaFile) model.MediaFile {
|
func mf(mf model.MediaFile) model.MediaFile {
|
||||||
mf.Tags = model.Tags{}
|
mf.Tags = model.Tags{}
|
||||||
mf.LibraryID = 1
|
mf.LibraryID = 1
|
||||||
|
|
|
@ -145,7 +145,7 @@ var _ = Describe("PlaylistRepository", func() {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
// BFR Validate these tests
|
// TODO Validate these tests
|
||||||
XContext("child smart playlists", func() {
|
XContext("child smart playlists", func() {
|
||||||
When("refresh day has expired", func() {
|
When("refresh day has expired", func() {
|
||||||
It("should refresh tracks for smart playlist referenced in parent smart playlist criteria", func() {
|
It("should refresh tracks for smart playlist referenced in parent smart playlist criteria", func() {
|
||||||
|
|
|
@ -98,7 +98,6 @@ type ProgressInfo struct {
|
||||||
|
|
||||||
type scanner interface {
|
type scanner interface {
|
||||||
scanAll(ctx context.Context, fullScan bool, progress chan<- *ProgressInfo)
|
scanAll(ctx context.Context, fullScan bool, progress chan<- *ProgressInfo)
|
||||||
// BFR: scanFolders(ctx context.Context, lib model.Lib, folders []string, progress chan<- *ScannerStatus)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type controller struct {
|
type controller struct {
|
||||||
|
|
|
@ -235,7 +235,6 @@ func osChildFromMediaFile(ctx context.Context, mf model.MediaFile) *responses.Op
|
||||||
child.BitDepth = int32(mf.BitDepth)
|
child.BitDepth = int32(mf.BitDepth)
|
||||||
child.Genres = toItemGenres(mf.Genres)
|
child.Genres = toItemGenres(mf.Genres)
|
||||||
child.Moods = mf.Tags.Values(model.TagMood)
|
child.Moods = mf.Tags.Values(model.TagMood)
|
||||||
// BFR What if Child is an Album and not a Song?
|
|
||||||
child.DisplayArtist = mf.Artist
|
child.DisplayArtist = mf.Artist
|
||||||
child.Artists = artistRefs(mf.Participants[model.RoleArtist])
|
child.Artists = artistRefs(mf.Participants[model.RoleArtist])
|
||||||
child.DisplayAlbumArtist = mf.AlbumArtist
|
child.DisplayAlbumArtist = mf.AlbumArtist
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue