mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-07 04:42:58 -05:00
[web] Fix shadowed variables
This commit is contained in:
@@ -122,10 +122,10 @@ export default {
|
||||
open_remove_podcast_dialog() {
|
||||
webapi
|
||||
.library_album_tracks(this.selected_item.id, { limit: 1 })
|
||||
.then(({ data }) => {
|
||||
webapi.library_track_playlists(data.items[0].id).then(({ data }) => {
|
||||
.then(({ data: album }) => {
|
||||
webapi.library_track_playlists(album.items[0].id).then(({ data }) => {
|
||||
;[this.rss_playlist_to_remove] = data.items.filter(
|
||||
(pl) => pl.type === 'rss'
|
||||
(playlist) => playlist.type === 'rss'
|
||||
)
|
||||
this.show_remove_podcast_modal = true
|
||||
this.show_details_modal = false
|
||||
|
||||
@@ -68,18 +68,13 @@ export default {
|
||||
})
|
||||
// Split the verses into words
|
||||
parsed.forEach((verse, index, lyrics) => {
|
||||
const duration =
|
||||
index < lyrics.length - 1 ? lyrics[index + 1].time - verse.time : 3
|
||||
const unitDuration = duration / verse.text.length
|
||||
const unitDuration =
|
||||
(lyrics[index + 1].time - verse.time || 3) / verse.text.length
|
||||
let delay = 0
|
||||
verse.words = verse.text.match(/\S+\s*/gu).map((text) => {
|
||||
const duration = text.length * unitDuration
|
||||
delay += duration
|
||||
return {
|
||||
duration,
|
||||
delay,
|
||||
text
|
||||
}
|
||||
return { duration, delay, text }
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user