mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-26 23:25:56 -05:00
[web-src] Show composer in "now playing" page depending on the settings
for "show_composer_now_playing" and "show_composer_for_genre"
This commit is contained in:
parent
9ab1677f1f
commit
8ae382d818
@ -144,8 +144,6 @@ section.fd-tabs-section + section.fd-content {
|
||||
}
|
||||
|
||||
/* Now playing progress bar */
|
||||
.fd-progress-now-playing {
|
||||
}
|
||||
.seek-slider {
|
||||
min-width: 250px;
|
||||
max-width: 500px;
|
||||
|
@ -8,6 +8,9 @@
|
||||
<h2 class="title is-6">
|
||||
{{ now_playing.artist }}
|
||||
</h2>
|
||||
<h2 class="subtitle is-6 has-text-grey has-text-weight-bold" v-if="composer">
|
||||
{{ composer }}
|
||||
</h2>
|
||||
<h3 class="subtitle is-6">
|
||||
{{ now_playing.album }}
|
||||
</h3>
|
||||
@ -102,12 +105,34 @@ export default {
|
||||
state () {
|
||||
return this.$store.state.player
|
||||
},
|
||||
|
||||
now_playing () {
|
||||
return this.$store.getters.now_playing
|
||||
},
|
||||
|
||||
artwork_url: function () {
|
||||
return webapi.artwork_url_append_size_params(this.now_playing.artwork_url)
|
||||
},
|
||||
|
||||
settings_option_show_composer_now_playing () {
|
||||
return this.$store.getters.settings_option_show_composer_now_playing
|
||||
},
|
||||
|
||||
settings_option_show_composer_for_genre () {
|
||||
return this.$store.getters.settings_option_show_composer_for_genre
|
||||
},
|
||||
|
||||
composer () {
|
||||
if (this.settings_option_show_composer_now_playing) {
|
||||
if (!this.settings_option_show_composer_for_genre ||
|
||||
(this.now_playing.genre &&
|
||||
this.settings_option_show_composer_for_genre.toLowerCase()
|
||||
.split(',')
|
||||
.findIndex(elem => this.now_playing.genre.toLowerCase().indexOf(elem.trim()) >= 0) >= 0)) {
|
||||
return this.now_playing.composer
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user