chore: remove some BFR-related TODOs that are not valid anymore

Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
Deluan 2025-03-23 11:37:20 -04:00
parent 57e0f6d3ea
commit 223e88d481
12 changed files with 6 additions and 20 deletions

View file

@ -306,7 +306,6 @@ func Load(noConfigDump bool) {
disableExternalServices()
}
// BFR Remove before release
if Server.Scanner.Extractor != consts.DefaultScannerExtractor {
log.Warn(fmt.Sprintf("Extractor '%s' is not implemented, using 'taglib'", Server.Scanner.Extractor))
Server.Scanner.Extractor = consts.DefaultScannerExtractor

View file

@ -15,7 +15,7 @@ import (
. "github.com/onsi/gomega"
)
// BFR Fix tests
// TODO Fix tests
var _ = XDescribe("Artwork", func() {
var aw *artwork
var ds model.DataStore

View file

@ -239,7 +239,6 @@ func (f *fakeScrobbler) Scrobble(ctx context.Context, userId string, s Scrobble)
return nil
}
// BFR This is duplicated in a few places
func _p(id, name string, sortName ...string) model.Participant {
p := model.Participant{Artist: model.Artist{ID: id, Name: name}}
if len(sortName) > 0 {

View file

@ -17,7 +17,7 @@ type Album struct {
Name string `structs:"name" json:"name"`
EmbedArtPath string `structs:"embed_art_path" json:"-"`
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"`
MaxYear int `structs:"max_year" json:"maxYear"`
MinYear int `structs:"min_year" json:"minYear"`

View file

@ -31,10 +31,10 @@ type MediaFile struct {
Title string `structs:"title" json:"title"`
Album string `structs:"album" json:"album"`
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"`
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"`
AlbumID string `structs:"album_id" json:"albumId"`
HasCoverArt bool `structs:"has_cover_art" json:"hasCoverArt"`

View file

@ -184,7 +184,6 @@ func allRolesFilter(_ string, value interface{}) Sqlizer {
func (r *albumRepository) CountAll(options ...model.QueryOptions) (int64, error) {
sql := r.newSelect()
sql = r.withAnnotation(sql, "album.id")
// BFR WithParticipants (for filtering by name)?
return r.count(sql, options...)
}

View file

@ -85,7 +85,7 @@ func (a *dbArtist) PostMapArgs(m map[string]any) error {
m["full_text"] = formatFullText(a.Name, a.SortArtistName)
// 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) == "" {
delete(m, "sort_artist_name")
}
@ -134,7 +134,6 @@ func roleFilter(_ string, role any) Sqlizer {
func (r *artistRepository) selectArtist(options ...model.QueryOptions) SelectBuilder {
query := r.newSelect(options...).Columns("artist.*")
query = r.withAnnotation(query, "artist.id")
// BFR How to handle counts and sizes (per role)?
return query
}

View file

@ -105,7 +105,6 @@ var mediaFileFilter = sync.OnceValue(func() map[string]filterFunc {
func (r *mediaFileRepository) CountAll(options ...model.QueryOptions) (int64, error) {
query := r.newSelect()
query = r.withAnnotation(query, "media_file.id")
// BFR WithParticipants (for filtering by name)?
return r.count(query, options...)
}

View file

@ -29,13 +29,6 @@ func TestPersistence(t *testing.T) {
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 {
mf.Tags = model.Tags{}
mf.LibraryID = 1

View file

@ -145,7 +145,7 @@ var _ = Describe("PlaylistRepository", func() {
})
})
// BFR Validate these tests
// TODO Validate these tests
XContext("child smart playlists", func() {
When("refresh day has expired", func() {
It("should refresh tracks for smart playlist referenced in parent smart playlist criteria", func() {

View file

@ -98,7 +98,6 @@ type ProgressInfo struct {
type scanner interface {
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 {

View file

@ -235,7 +235,6 @@ func osChildFromMediaFile(ctx context.Context, mf model.MediaFile) *responses.Op
child.BitDepth = int32(mf.BitDepth)
child.Genres = toItemGenres(mf.Genres)
child.Moods = mf.Tags.Values(model.TagMood)
// BFR What if Child is an Album and not a Song?
child.DisplayArtist = mf.Artist
child.Artists = artistRefs(mf.Participants[model.RoleArtist])
child.DisplayAlbumArtist = mf.AlbumArtist