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