mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-26 23:25:56 -05:00
[web] Format source code
This commit is contained in:
parent
a9092e54c0
commit
66b1e444d1
@ -80,21 +80,19 @@ export default {
|
||||
lyrics() {
|
||||
const lyrics = this.$store.getters.lyrics
|
||||
const lyricsObj = []
|
||||
if (lyrics) {
|
||||
const regex = /(\[(\d+):(\d+)(?:\.\d+)?\] ?)?(.*)/
|
||||
lyrics.split('\n').forEach((item) => {
|
||||
const matches = regex.exec(item)
|
||||
if (matches && matches[4]) {
|
||||
const obj = [matches[4]]
|
||||
if (matches[2] && matches[3])
|
||||
obj.push(
|
||||
matches[2] * 60 + matches[3] * 1
|
||||
)
|
||||
lyricsObj.push(obj)
|
||||
}
|
||||
})
|
||||
}
|
||||
return lyricsObj
|
||||
if (lyrics) {
|
||||
const regex = /(\[(\d+):(\d+)(?:\.\d+)?\] ?)?(.*)/
|
||||
lyrics.split('\n').forEach((item) => {
|
||||
const matches = regex.exec(item)
|
||||
if (matches && matches[4]) {
|
||||
const obj = [matches[4]]
|
||||
if (matches[2] && matches[3])
|
||||
obj.push(matches[2] * 60 + matches[3] * 1)
|
||||
lyricsObj.push(obj)
|
||||
}
|
||||
})
|
||||
}
|
||||
return lyricsObj
|
||||
},
|
||||
player() {
|
||||
return this.$store.state.player
|
||||
|
Loading…
Reference in New Issue
Block a user