diff --git a/pages/dashboard/dashboard.pixy b/pages/dashboard/dashboard.pixy index abf934f4..d2494772 100644 --- a/pages/dashboard/dashboard.pixy +++ b/pages/dashboard/dashboard.pixy @@ -46,7 +46,7 @@ component Dashboard(schedule []*arn.UpcomingEpisode, posts []arn.Postable, sound a.widget-ui-element.ajax(href=soundTracks[i].Link()) .widget-ui-element-text Icon("music") - span(title=soundTracks[i].Media[0].Title)= soundTracks[i].Anime()[0].Title.Canonical + span(title=soundTracks[i].Title)= soundTracks[i].MainAnime().Title.Canonical else .widget-ui-element .widget-ui-element-text diff --git a/pages/soundtrack/edit.go b/pages/soundtrack/edit.go index 9571056e..e6f8929e 100644 --- a/pages/soundtrack/edit.go +++ b/pages/soundtrack/edit.go @@ -23,7 +23,7 @@ func Edit(ctx *aero.Context) string { ctx.Data = &arn.OpenGraph{ Tags: map[string]string{ - "og:title": track.Media[0].Title, + "og:title": track.Title, "og:image": track.MainAnime().Image.Large, "og:url": "https://" + ctx.App.Config.Domain + track.Link(), "og:site_name": "notify.moe", @@ -63,6 +63,10 @@ func EditForm(obj interface{}, title string) string { b.WriteString(components.InputText(field.Name, fieldValue.String(), field.Name, "")) case "[]string": b.WriteString(components.InputTags(field.Name, fieldValue.Interface().([]string), field.Name)) + case "[]*arn.ExternalMedia": + for sliceIndex := 0; sliceIndex < fieldValue.Len(); sliceIndex++ { + b.WriteString(EditForm(fieldValue.Index(sliceIndex).Interface(), "External Media")) + } default: panic("No edit form implementation for " + field.Name + " with type " + field.Type.String()) } diff --git a/pages/soundtrack/soundtrack.go b/pages/soundtrack/soundtrack.go index 86adaa19..afc492c8 100644 --- a/pages/soundtrack/soundtrack.go +++ b/pages/soundtrack/soundtrack.go @@ -19,7 +19,7 @@ func Get(ctx *aero.Context) string { ctx.Data = &arn.OpenGraph{ Tags: map[string]string{ - "og:title": track.Media[0].Title, + "og:title": track.Title, "og:image": track.MainAnime().Image.Large, "og:url": "https://" + ctx.App.Config.Domain + track.Link(), "og:site_name": "notify.moe", diff --git a/sw/service-worker.ts b/sw/service-worker.ts index 6f800784..f48c7eca 100644 --- a/sw/service-worker.ts +++ b/sw/service-worker.ts @@ -1,6 +1,6 @@ // pack:ignore -const CACHE = "v-1" +const CACHE = "v-2" const RELOADS = new Map>() const ETAGS = new Map() const CACHEREFRESH = new Map>()