mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-25 22:55:56 -05:00
[web] Fix shadowed variables
This commit is contained in:
parent
8a303f340b
commit
7826b36634
@ -28,7 +28,6 @@ export default [
|
||||
'no-negated-condition': 'off',
|
||||
'no-nested-ternary': 'off',
|
||||
'no-plusplus': 'off',
|
||||
'no-shadow': 'off',
|
||||
'no-ternary': 'off',
|
||||
'no-undef': 'off',
|
||||
'no-unused-vars': ['error', { args: 'none', caughtErrors: 'none' }],
|
||||
|
@ -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 }
|
||||
})
|
||||
})
|
||||
}
|
||||
|
@ -80,7 +80,6 @@ export class GroupedList {
|
||||
}
|
||||
|
||||
group({ criteria = [], filters = [], index } = {}) {
|
||||
const indexer = createIndexer(index)
|
||||
const itemsFiltered = this.items.filter((item) =>
|
||||
filters.every((filter) => filter(item))
|
||||
)
|
||||
@ -94,9 +93,10 @@ export class GroupedList {
|
||||
)
|
||||
)
|
||||
// Group item list
|
||||
const indexer = createIndexer(index)
|
||||
this.itemsGrouped = itemsSorted.reduce((map, item) => {
|
||||
const index = indexer(item)
|
||||
map.set(index, [...(map.get(index) || []), item])
|
||||
const key = indexer(item)
|
||||
map.set(key, [...(map.get(key) || []), item])
|
||||
return map
|
||||
}, new Map())
|
||||
// Create index list
|
||||
|
Loading…
Reference in New Issue
Block a user