feat(subsonic)!: drop support for guessed artist covers in filesystem

it doesn't make sense with multi-artist support anymore

gonic will use lastfm or an album cover instead

Release-As: 0.16.0
This commit is contained in:
sentriz
2023-09-07 00:19:04 +01:00
parent 3ac77823c3
commit 657fb221db
16 changed files with 198 additions and 156 deletions

View File

@@ -57,6 +57,7 @@ func (db *DB) Migrate(ctx MigrationContext) error {
construct(ctx, "202304221528", migratePlaylistsToM3U),
construct(ctx, "202305301718", migratePlayCountToLength),
construct(ctx, "202307281628", migrateAlbumArtistsMany2Many),
construct(ctx, "202309070009", migrateDeleteArtistCoverField),
}
return gormigrate.
@@ -589,3 +590,18 @@ func migrateAlbumArtistsMany2Many(tx *gorm.DB, _ MigrationContext) error {
return nil
}
func migrateDeleteArtistCoverField(tx *gorm.DB, _ MigrationContext) error {
if !tx.Dialect().HasColumn("artists", "cover") {
return nil
}
step := tx.Exec(`
ALTER TABLE artists DROP COLUMN cover;
`)
if err := step.Error; err != nil {
return fmt.Errorf("step drop: %w", err)
}
return nil
}