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 != ""
|
if track.File != ""
|
||||||
.soundtrack-media
|
.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)
|
.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
|
button.soundtrack-play-button
|
||||||
RawIcon("play")
|
RawIcon("play")
|
||||||
|
|
||||||
@ -28,10 +28,10 @@ component SoundTrackMedia(track *arn.SoundTrack)
|
|||||||
|
|
||||||
component SoundTrackFooter(track *arn.SoundTrack)
|
component SoundTrackFooter(track *arn.SoundTrack)
|
||||||
.soundtrack-footer
|
.soundtrack-footer
|
||||||
if track.NewTitle.ByUser(nil) == ""
|
if track.Title.ByUser(nil) == ""
|
||||||
a(href=track.Link() + "/edit") untitled
|
a(href=track.Link() + "/edit") untitled
|
||||||
else
|
else
|
||||||
a(href=track.Link())= track.NewTitle.ByUser(nil)
|
a(href=track.Link())= track.Title.ByUser(nil)
|
||||||
span posted
|
span posted
|
||||||
span.utc-date(data-date=track.Created)
|
span.utc-date(data-date=track.Created)
|
||||||
span by
|
span by
|
||||||
|
@ -13,7 +13,7 @@ component SoundTracksEditorList(tracks []*arn.SoundTrack, count int, url string,
|
|||||||
tr.mountable
|
tr.mountable
|
||||||
td= len(track.Likes)
|
td= len(track.Likes)
|
||||||
td
|
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
|
td
|
||||||
each media in track.Media
|
each media in track.Media
|
||||||
if media.Service == "Youtube"
|
if media.Service == "Youtube"
|
||||||
|
@ -104,7 +104,7 @@ component SoundTrackSearchResults(tracks []*arn.SoundTrack)
|
|||||||
ul.soundtrack-search
|
ul.soundtrack-search
|
||||||
each track in tracks
|
each track in tracks
|
||||||
li.mountable(data-mountable-type="track")
|
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
|
span.soundtrack-search-anime= " - " + track.MainAnime().Title.Canonical
|
||||||
|
|
||||||
component CompanySearchResults(companies []*arn.Company)
|
component CompanySearchResults(companies []*arn.Company)
|
||||||
|
@ -2,10 +2,10 @@ component SoundTrackPage(track *arn.SoundTrack, user *arn.User)
|
|||||||
SoundTrackTabs(track, user)
|
SoundTrackTabs(track, user)
|
||||||
|
|
||||||
.soundtrack-full-page
|
.soundtrack-full-page
|
||||||
if track.NewTitle.ByUser(user) == ""
|
if track.Title.ByUser(user) == ""
|
||||||
h1.mountable untitled
|
h1.mountable untitled
|
||||||
else
|
else
|
||||||
h1.mountable= track.NewTitle.ByUser(user)
|
h1.mountable= track.Title.ByUser(user)
|
||||||
|
|
||||||
.widget-form.soundtrack-media-list
|
.widget-form.soundtrack-media-list
|
||||||
each media in track.Media
|
each media in track.Media
|
||||||
|
@ -5,9 +5,9 @@ func main() {
|
|||||||
|
|
||||||
// for track := range arn.StreamSoundTracks() {
|
// for track := range arn.StreamSoundTracks() {
|
||||||
// if arn.ContainsUnicodeLetters(track.Title) {
|
// if arn.ContainsUnicodeLetters(track.Title) {
|
||||||
// track.NewTitle.Native = track.Title
|
// track.Title.Native = track.Title
|
||||||
// } else {
|
// } else {
|
||||||
// track.NewTitle.Canonical = track.Title
|
// track.Title.Canonical = track.Title
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// track.Save()
|
// track.Save()
|
||||||
|
Loading…
Reference in New Issue
Block a user