diff --git a/resources/cider-ui-tests/index.html b/resources/cider-ui-tests/index.html index 8a9dc045..a93a4be2 100644 --- a/resources/cider-ui-tests/index.html +++ b/resources/cider-ui-tests/index.html @@ -394,12 +394,14 @@
{{data.attributes.name ?? (data.attributes.title ?? '') ?? ''}}
{{data.attributes.artistName ?? ''}}
-
{{(data.attributes.editorialNotes) ? (data.attributes.editorialNotes.standard ?? '' ) : (data.attributes.description ? data.attributes.description.standard ?? '' : '')}}
+
+
{{app.getTotalTime()}}
+ diff --git a/resources/cider-ui-tests/index.js b/resources/cider-ui-tests/index.js index 87122aff..44812331 100644 --- a/resources/cider-ui-tests/index.js +++ b/resources/cider-ui-tests/index.js @@ -357,6 +357,11 @@ const app = new Vue({ downloadChunk() }, + getTotalTime(){ + if (app.showingPlaylist.relationships.tracks.data.length > 0){ + time = Math.round([].concat(...app.showingPlaylist.relationships.tracks.data).reduce((a, { attributes: { durationInMillis }}) => a + durationInMillis, 0)/60000); + return app.showingPlaylist.relationships.tracks.data.length + " tracks, "+ time +" mins.";} else return "" + }, async getLibrarySongs() { var response = await this.mkapi("songs", true, "", {limit: 100}, {includeResponseMeta: !0}) this.library.songs.listing = response.data diff --git a/resources/cider-ui-tests/style.css b/resources/cider-ui-tests/style.css index 27539a60..1c8a2ca3 100644 --- a/resources/cider-ui-tests/style.css +++ b/resources/cider-ui-tests/style.css @@ -1757,4 +1757,9 @@ input[type=range].web-slider::-webkit-slider-runnable-track { font-size: 1.1rem; flex-shrink: unset; margin-right: 5px; +} + +.playlist-time { + margin: 6px; + opacity: 0.7; } \ No newline at end of file