[web] Change to template literals

This commit is contained in:
Alain Nussbaumer
2023-11-23 20:23:40 +01:00
parent 5cd63294a2
commit 406c87f765
13 changed files with 71 additions and 115 deletions

View File

@@ -105,7 +105,7 @@ export default {
play() {
webapi.player_play_expression(
'composer is "' + this.composer.name + '" and media_kind is music',
`composer is "${this.composer.name}" and media_kind is music`,
true
)
}

View File

@@ -130,7 +130,7 @@ export default {
computed: {
expression() {
return 'composer is "' + this.composer.name + '" and media_kind is music'
return `composer is "${this.composer.name}" and media_kind is music`
},
selected_groupby_option_id: {
get() {

View File

@@ -110,9 +110,7 @@ export default {
},
play_expression() {
return (
'path starts with "' + this.current_directory + '" order by path asc'
)
return `path starts with "${this.current_directory}" order by path asc`
}
},

View File

@@ -430,12 +430,7 @@ export default {
if (query.query.startsWith('query:')) {
searchParams.expression = query.query.replace(/^query:/, '').trim()
} else {
searchParams.expression =
'((album includes "' +
query.query +
'" or artist includes "' +
query.query +
'") and media_kind is audiobook)'
searchParams.expression = `((album includes "${query.query}" or artist includes "${query.query}") and media_kind is audiobook)`
}
if (query.limit) {
@@ -461,12 +456,7 @@ export default {
if (query.query.startsWith('query:')) {
searchParams.expression = query.query.replace(/^query:/, '').trim()
} else {
searchParams.expression =
'((album includes "' +
query.query +
'" or artist includes "' +
query.query +
'") and media_kind is podcast)'
searchParams.expression = `((album includes "${query.query}" or artist includes "${query.query}") and media_kind is podcast)`
}
if (query.limit) {