diff --git a/src/renderer/index.js b/src/renderer/index.js index 365789cc..77aad13e 100644 --- a/src/renderer/index.js +++ b/src/renderer/index.js @@ -1574,6 +1574,19 @@ const app = new Vue({ this.getArtistFromID(id) //this.getTypeFromID("artist",id,isLibrary,query) }, + followArtistById(id, follow) { + if (follow && !this.followingArist(id)) { + this.cfg.home.followedArtists.push(id) + } else { + let index = this.cfg.home.followedArtists.indexOf(this.item.id) + if (index > -1) { + this.cfg.home.followedArtists.splice(index, 1) + } + } + }, + followingArtist(id) { + return this.cfg.home.followedArtists.includes(id) + }, playMediaItem(item) { let kind = (item.attributes.playParams ? (item.attributes.playParams.kind ?? (item.type ?? '')) : (item.type ?? '')); let id = (item.attributes.playParams ? (item.attributes.playParams.id ?? (item.id ?? '')) : (item.id ?? '')); diff --git a/src/renderer/views/components/artist-chip.ejs b/src/renderer/views/components/artist-chip.ejs index 345cbd6e..8a8a7c21 100644 --- a/src/renderer/views/components/artist-chip.ejs +++ b/src/renderer/views/components/artist-chip.ejs @@ -6,8 +6,8 @@