add some podcast nit changes and make podcasts mandatory
This commit is contained in:
committed by
Senan Kelly
parent
9c4286b0e2
commit
37fca3a087
@@ -128,7 +128,6 @@ type templateData struct {
|
||||
DefaultListenBrainzURL string
|
||||
SelectedUser *db.User
|
||||
//
|
||||
PodcastsEnabled bool
|
||||
Podcasts []*db.Podcast
|
||||
}
|
||||
|
||||
|
||||
@@ -46,10 +46,6 @@ func (c *Controller) ServeHome(r *http.Request) *Response {
|
||||
c.DB.Table("artists").Count(&data.ArtistCount)
|
||||
c.DB.Table("albums").Count(&data.AlbumCount)
|
||||
c.DB.Table("tracks").Count(&data.TrackCount)
|
||||
data.PodcastsEnabled = c.Podcasts.PodcastBasePath != ""
|
||||
if data.PodcastsEnabled {
|
||||
c.DB.Find(&data.Podcasts)
|
||||
}
|
||||
// ** begin lastfm box
|
||||
scheme := firstExisting(
|
||||
"http", // fallback
|
||||
@@ -92,6 +88,8 @@ func (c *Controller) ServeHome(r *http.Request) *Response {
|
||||
for profile := range encode.Profiles() {
|
||||
data.TranscodeProfiles = append(data.TranscodeProfiles, profile)
|
||||
}
|
||||
// ** begin podcasts box
|
||||
c.DB.Find(&data.Podcasts)
|
||||
//
|
||||
return &Response{
|
||||
template: "home.tmpl",
|
||||
|
||||
Reference in New Issue
Block a user