Changed if() to if ()
This commit is contained in:
parent
91ac19974c
commit
9c85fafd1d
22 changed files with 44 additions and 44 deletions
|
@ -90,7 +90,7 @@
|
|||
return "https://beta.music.apple.com/assets/product/MissingArtworkMusic.svg"
|
||||
}
|
||||
height = parseInt(height * window.devicePixelRatio)
|
||||
if(width) {
|
||||
if (width) {
|
||||
width = parseInt(width * window.devicePixelRatio)
|
||||
}
|
||||
let newurl = `${url.replace('{w}', width ?? height).replace('{h}', height).replace('{f}', "webp").replace('{c}', ((width === 900) ? "sr" : "cc"))}`;
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
|
||||
},
|
||||
getSubtitle() {
|
||||
if(this.kind == 'card') {
|
||||
if (this.kind == 'card') {
|
||||
try {
|
||||
if (typeof this.item.attributes.artistNames != "undefined") {
|
||||
return this.item.attributes.artistNames
|
||||
|
@ -116,7 +116,7 @@
|
|||
}
|
||||
},
|
||||
getSubtitleNavigation() {
|
||||
if(this.kind == 'card') {
|
||||
if (this.kind == 'card') {
|
||||
try {
|
||||
if (typeof this.item.attributes.artistNames != "undefined") {
|
||||
return app.routeView(this.item)
|
||||
|
@ -200,7 +200,7 @@
|
|||
},
|
||||
getArtworkUrl(size = -1, includeUrl = false) {
|
||||
let artwork = this.item.attributes.artwork ? this.item.attributes.artwork.url : ''
|
||||
if(size != -1) {
|
||||
if (size != -1) {
|
||||
artwork = artwork.replace('{w}', size).replace('{h}', size).replace('{f}', "webp").replace('{c}', ((size === 900) ? "sr" : "cc"))
|
||||
}
|
||||
switch (this.kind) {
|
||||
|
@ -208,7 +208,7 @@
|
|||
artwork = this.item.attributes.editorialArtwork.subscriptionHero.url
|
||||
break;
|
||||
}
|
||||
if(!includeUrl) {
|
||||
if (!includeUrl) {
|
||||
return artwork
|
||||
}else{
|
||||
return `url("${artwork}")`
|
||||
|
@ -423,7 +423,7 @@
|
|||
|
||||
try {
|
||||
await this.isInLibrary().then((_) => {
|
||||
if(self.addedToLibrary) {
|
||||
if (self.addedToLibrary) {
|
||||
menus.normal.items.find(x => x.id == 'addToLibrary').hidden = true
|
||||
menus.normal.items.find(x => x.id == 'removeFromLibrary').hidden = false
|
||||
}else{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue