From 8ae382d8185bb04f4b7e2a3e00f2ef504f182218 Mon Sep 17 00:00:00 2001 From: chme Date: Fri, 23 Aug 2019 19:40:17 +0200 Subject: [PATCH] [web-src] Show composer in "now playing" page depending on the settings for "show_composer_now_playing" and "show_composer_for_genre" --- web-src/src/mystyles.css | 2 -- web-src/src/pages/PageNowPlaying.vue | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/web-src/src/mystyles.css b/web-src/src/mystyles.css index 9a27978e..f72731f0 100644 --- a/web-src/src/mystyles.css +++ b/web-src/src/mystyles.css @@ -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; diff --git a/web-src/src/pages/PageNowPlaying.vue b/web-src/src/pages/PageNowPlaying.vue index 9537b2da..f312eb80 100644 --- a/web-src/src/pages/PageNowPlaying.vue +++ b/web-src/src/pages/PageNowPlaying.vue @@ -8,6 +8,9 @@

{{ now_playing.artist }}

+

+ {{ composer }} +

{{ now_playing.album }}

@@ -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 } },