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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user