fix some part of playlist view
This commit is contained in:
parent
2a3526d133
commit
f97ab166de
3 changed files with 13 additions and 1 deletions
|
@ -394,12 +394,14 @@
|
|||
<div class="playlist-info">
|
||||
<div class="playlist-name">{{data.attributes.name ?? (data.attributes.title ?? '') ?? ''}}</div>
|
||||
<div class="playlist-artist" v-if="data.attributes.artistName">{{data.attributes.artistName ?? ''}}</div>
|
||||
<div class="playlist-desc">{{(data.attributes.editorialNotes) ? (data.attributes.editorialNotes.standard ?? '' ) : (data.attributes.description ? data.attributes.description.standard ?? '' : '')}}</div>
|
||||
<div class="playlist-desc" v-html="((data.attributes.editorialNotes) ? (data.attributes.editorialNotes.short ?? (data.attributes.editorialNotes.standard ?? '') ) : (data.attributes.description ? (data.attributes.description.short ?? (data.attributes.description.standard ?? '')) : ''))"></div>
|
||||
</div>
|
||||
</div>
|
||||
<mediaitem-list-item :item="item"
|
||||
v-for="item in data.relationships.tracks.data"></mediaitem-list-item>
|
||||
<div class="playlist-time" >{{app.getTotalTime()}}</div>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
</script>
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue