Add Internet Radio support (#2063)
* add internet radio support * Add dynamic sidebar icon to Radios * Fix typos * Make URL suffix consistent * Fix typo * address feedback * Don't need to preload when playing Internet Radios * Reorder migration, or else it won't be applied * Make Radio list view responsive Also added filter by name, removed RadioActions and RadioContextMenu, and added a default radio icon, in case of favicon is not available. * Simplify StreamField usage * fix button, hide progress on mobile * use js styles over index.css Co-authored-by: Deluan <deluan@navidrome.org>
This commit is contained in:
@@ -69,6 +69,12 @@ var (
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
radioWithoutHomePage = model.Radio{ID: "1235", StreamUrl: "https://example.com:8000/1/stream.mp3", HomePageUrl: "", Name: "No Homepage"}
|
||||
radioWithHomePage = model.Radio{ID: "5010", StreamUrl: "https://example.com/stream.mp3", Name: "Example Radio", HomePageUrl: "https://example.com"}
|
||||
testRadios = model.Radios{radioWithoutHomePage, radioWithHomePage}
|
||||
)
|
||||
|
||||
var (
|
||||
plsBest model.Playlist
|
||||
plsCool model.Playlist
|
||||
@@ -84,7 +90,7 @@ func P(path string) string {
|
||||
var _ = BeforeSuite(func() {
|
||||
o := orm.NewOrm()
|
||||
ctx := log.NewContext(context.TODO())
|
||||
user := model.User{ID: "userid", UserName: "userid"}
|
||||
user := model.User{ID: "userid", UserName: "userid", IsAdmin: true}
|
||||
ctx = request.WithUser(ctx, user)
|
||||
|
||||
ur := NewUserRepository(ctx, o)
|
||||
@@ -129,6 +135,15 @@ var _ = BeforeSuite(func() {
|
||||
}
|
||||
}
|
||||
|
||||
rar := NewRadioRepository(ctx, o)
|
||||
for i := range testRadios {
|
||||
r := testRadios[i]
|
||||
err := rar.Put(&r)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
plsBest = model.Playlist{
|
||||
Name: "Best",
|
||||
Comment: "No Comments",
|
||||
|
||||
Reference in New Issue
Block a user