Migration to new track title struct
This commit is contained in:
parent
ea03c6cc17
commit
33a1d84426
@ -15,7 +15,7 @@ component SoundTrackMedia(track *arn.SoundTrack)
|
||||
if track.File != ""
|
||||
.soundtrack-media
|
||||
.soundtrack-play-area.action(data-action="toggleAudio", data-trigger="click", data-audio-src="https://notify.moe/audio/" + track.File, data-soundtrack-id=track.ID)
|
||||
img.soundtrack-image.lazy(data-src="https://img.youtube.com/vi/" + track.MediaByService("Youtube")[0].ServiceID + "/0.jpg", alt=track.NewTitle)
|
||||
img.soundtrack-image.lazy(data-src="https://img.youtube.com/vi/" + track.MediaByService("Youtube")[0].ServiceID + "/0.jpg", alt=track.Title)
|
||||
button.soundtrack-play-button
|
||||
RawIcon("play")
|
||||
|
||||
@ -28,10 +28,10 @@ component SoundTrackMedia(track *arn.SoundTrack)
|
||||
|
||||
component SoundTrackFooter(track *arn.SoundTrack)
|
||||
.soundtrack-footer
|
||||
if track.NewTitle.ByUser(nil) == ""
|
||||
if track.Title.ByUser(nil) == ""
|
||||
a(href=track.Link() + "/edit") untitled
|
||||
else
|
||||
a(href=track.Link())= track.NewTitle.ByUser(nil)
|
||||
a(href=track.Link())= track.Title.ByUser(nil)
|
||||
span posted
|
||||
span.utc-date(data-date=track.Created)
|
||||
span by
|
||||
|
@ -13,7 +13,7 @@ component SoundTracksEditorList(tracks []*arn.SoundTrack, count int, url string,
|
||||
tr.mountable
|
||||
td= len(track.Likes)
|
||||
td
|
||||
a(href=track.Link(), target="_blank", rel="noopener")= track.NewTitle.ByUser(user)
|
||||
a(href=track.Link(), target="_blank", rel="noopener")= track.Title.ByUser(user)
|
||||
td
|
||||
each media in track.Media
|
||||
if media.Service == "Youtube"
|
||||
|
@ -104,7 +104,7 @@ component SoundTrackSearchResults(tracks []*arn.SoundTrack)
|
||||
ul.soundtrack-search
|
||||
each track in tracks
|
||||
li.mountable(data-mountable-type="track")
|
||||
a(href=track.Link())= track.NewTitle.ByUser(nil)
|
||||
a(href=track.Link())= track.Title.ByUser(nil)
|
||||
span.soundtrack-search-anime= " - " + track.MainAnime().Title.Canonical
|
||||
|
||||
component CompanySearchResults(companies []*arn.Company)
|
||||
|
@ -2,10 +2,10 @@ component SoundTrackPage(track *arn.SoundTrack, user *arn.User)
|
||||
SoundTrackTabs(track, user)
|
||||
|
||||
.soundtrack-full-page
|
||||
if track.NewTitle.ByUser(user) == ""
|
||||
if track.Title.ByUser(user) == ""
|
||||
h1.mountable untitled
|
||||
else
|
||||
h1.mountable= track.NewTitle.ByUser(user)
|
||||
h1.mountable= track.Title.ByUser(user)
|
||||
|
||||
.widget-form.soundtrack-media-list
|
||||
each media in track.Media
|
||||
|
@ -5,9 +5,9 @@ func main() {
|
||||
|
||||
// for track := range arn.StreamSoundTracks() {
|
||||
// if arn.ContainsUnicodeLetters(track.Title) {
|
||||
// track.NewTitle.Native = track.Title
|
||||
// track.Title.Native = track.Title
|
||||
// } else {
|
||||
// track.NewTitle.Canonical = track.Title
|
||||
// track.Title.Canonical = track.Title
|
||||
// }
|
||||
|
||||
// track.Save()
|
||||
|
Loading…
Reference in New Issue
Block a user