fix breaking slashes and show summary on player

pull/114/head
Akhil Gupta 4 years ago
parent 44671d3b07
commit 2a5ba05444

@ -739,6 +739,10 @@ div#large-visualization{
<span data-amplitude-song-info="artist"></span> <span data-amplitude-song-info="artist"></span>
<span data-amplitude-song-info="album"></span> <span data-amplitude-song-info="album"></span>
</div> </div>
<br>
<div class="song-summary">
<span data-amplitude-song-info="summary"></span>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -877,6 +881,7 @@ div#large-visualization{
url:"/podcastitems/"+x.ID+"/file", url:"/podcastitems/"+x.ID+"/file",
cover_art_url:image, cover_art_url:image,
artist:x.Podcast.Title, artist:x.Podcast.Title,
summary:x.Summary,
album: new Date(x.PubDate.substr(0,10)).toDateString() album: new Date(x.PubDate.substr(0,10)).toDateString()
} }
if(!toReturn.url){ if(!toReturn.url){

@ -187,6 +187,8 @@ var illegalName = regexp.MustCompile(`[^[:alnum:]-.]`)
func Name(s string) string { func Name(s string) string {
// Start with lowercase string // Start with lowercase string
fileName := s fileName := s
fileName = baseNameSeparators.ReplaceAllString(fileName, "-")
fileName = path.Clean(path.Base(fileName)) fileName = path.Clean(path.Base(fileName))
// Remove illegal characters for names, replacing some common separators with - // Remove illegal characters for names, replacing some common separators with -

@ -202,7 +202,7 @@ func AddPodcast(url string) (db.Podcast, error) {
if errors.Is(err, gorm.ErrRecordNotFound) { if errors.Is(err, gorm.ErrRecordNotFound) {
data, body, err := FetchURL(url) data, body, err := FetchURL(url)
if err != nil { if err != nil {
fmt.Println("Error") fmt.Println(err.Error())
Logger.Errorw("Error adding podcast", err) Logger.Errorw("Error adding podcast", err)
return db.Podcast{}, err return db.Podcast{}, err
} }

Loading…
Cancel
Save