feat(subsonic): expose album isCompilation and releaseTypes
This commit is contained in:
No files matched your search
@@ -339,6 +339,8 @@ type Album struct {
|
||||
TagTitleUDec string `sql:"default: null"`
|
||||
TagBrainzID string `sql:"default: null"`
|
||||
TagYear int `sql:"default: null"`
|
||||
TagCompilation bool `sql:"default: null"`
|
||||
TagReleaseType string `sql:"default: null"`
|
||||
Tracks []*Track
|
||||
ChildCount int `sql:"-"`
|
||||
Duration int `sql:"-"`
|
||||
|
||||
@@ -79,6 +79,7 @@ func (db *DB) Migrate(ctx MigrationContext) error {
|
||||
construct(ctx, "202504132036", migratePodcast),
|
||||
construct(ctx, "202505211202", migrateTrackAddIndexOnBrainzID),
|
||||
construct(ctx, "202505262025", migrateAlbumAddIndexOnBrainzID),
|
||||
construct(ctx, "202507062103", migrateAlbumCompilationReleaseType),
|
||||
}
|
||||
|
||||
return gormigrate.
|
||||
@@ -854,3 +855,9 @@ func migrateAlbumAddIndexOnBrainzID(tx *gorm.DB, _ MigrationContext) error {
|
||||
CREATE INDEX idx_albums_brainz_id ON "albums" (tag_brainz_id);
|
||||
`).Error
|
||||
}
|
||||
|
||||
func migrateAlbumCompilationReleaseType(tx *gorm.DB, _ MigrationContext) error {
|
||||
return tx.AutoMigrate(
|
||||
Album{},
|
||||
).Error
|
||||
}
|
||||
Reference in New Issue
Block a user