feat(subsonic): add internet radio support

* Initial commit of internet radio support.

* Added first test for internet radio.

* Refactor to prepare for more test cases.

* Added a few more tests. Realized that I was not calling as admin so added ability to mock admin.

* Added more internet radio tests. Added proper JSON unmarshaling for ID.

* More test cases. Fixed some accidental tabs in files.

* Fixed some more tabs.

* lint fixes

* Changed placeholder for homepage URL to fit into box.

* Finished out internet radio test cases. Found a few bad error codes in internet radio AND podcasts (mea culpa).

* Realized that delete via website was not checking properly if id existed. Fixed.

gofmt
This commit is contained in:
brian-doherty
2022-06-21 16:32:25 -05:00
committed by sentriz
parent 2afc63f64a
commit 7ab378accb
14 changed files with 743 additions and 12 deletions

View File

@@ -42,6 +42,7 @@ func (db *DB) Migrate(ctx MigrationContext) error {
construct(ctx, "202202121809", migrateAlbumRootDirAgain),
construct(ctx, "202202241218", migratePublicPlaylist),
construct(ctx, "202204270903", migratePodcastDropUserID),
construct(ctx, "202206011628", migrateInternetRadioStations),
}
return gormigrate.
@@ -356,3 +357,9 @@ func migratePodcastDropUserID(tx *gorm.DB, _ MigrationContext) error {
return nil
}
func migrateInternetRadioStations(tx *gorm.DB, _ MigrationContext) error {
return tx.AutoMigrate(
InternetRadioStation{},
).
Error
}