move album genre under album name and add release year
This commit is contained in:
parent
50322fa57f
commit
b44172289d
2 changed files with 18 additions and 2 deletions
|
@ -40,6 +40,7 @@
|
|||
@change="editPlaylist"
|
||||
@keydown.enter="editPlaylist"/>
|
||||
</div>
|
||||
<div class="playlist-time genre" style="margin: 1px;">{{getAlbumGenre()}}</div>
|
||||
<div class="playlist-artist item-navigate"
|
||||
v-if="getArtistName(data) != '' && !useArtistChip"
|
||||
@click="data.attributes && data.attributes.artistName ? app.searchAndNavigate(data,'artist') : ''">
|
||||
|
@ -168,7 +169,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="playlist-time genre">{{this.data.relationships.tracks.data[0].attributes.genreNames[0]}}</div>
|
||||
<div class="playlist-time">
|
||||
{{getFormattedDate()}}
|
||||
</div>
|
||||
|
@ -285,6 +285,14 @@
|
|||
return ""
|
||||
}
|
||||
},
|
||||
getAlbumGenre: function () {
|
||||
if (this.data.type.includes('albums')) {
|
||||
let date = this.data.attributes.releaseDate;
|
||||
if (date == null || date === "") return "";
|
||||
const releaseDate = new Date(date);
|
||||
return `${this.data.relationships.tracks.data[0].attributes.genreNames[0]} · ${releaseDate.getFullYear()}`
|
||||
}
|
||||
},
|
||||
async isInLibrary() {
|
||||
if (this.data.type && !this.data.type.includes("library")) {
|
||||
// please keep using vars here
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
@change="editPlaylist"
|
||||
@keydown.enter="editPlaylist"/>
|
||||
</div>
|
||||
<div class="playlist-time genre" style="margin: 1px;">{{getAlbumGenre()}}</div>
|
||||
<div class="playlist-artist item-navigate"
|
||||
v-if="getArtistName(data) != '' && !useArtistChip"
|
||||
@click="data.attributes && data.attributes.artistName ? app.searchAndNavigate(data,'artist') : ''">
|
||||
|
@ -179,7 +180,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="playlist-time genre">{{this.data.relationships.tracks.data[0].attributes.genreNames[0]}}</div>
|
||||
<div class="playlist-time">
|
||||
{{getFormattedDate()}}
|
||||
</div>
|
||||
|
@ -309,6 +309,14 @@
|
|||
return ""
|
||||
}
|
||||
},
|
||||
getAlbumGenre: function () {
|
||||
if (this.data.type.includes('albums')) {
|
||||
let date = this.data.attributes.releaseDate;
|
||||
if (date == null || date === "") return "";
|
||||
const releaseDate = new Date(date);
|
||||
return `${this.data.relationships.tracks.data[0].attributes.genreNames[0]} · ${releaseDate.getFullYear()}`
|
||||
}
|
||||
},
|
||||
async isInLibrary() {
|
||||
if (this.data.type && !this.data.type.includes("library")) {
|
||||
// please keep using vars here
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue