Skip to content

Commit

Permalink
Merge pull request #25 from 1hitsong/fixTopArtistImages
Browse files Browse the repository at this point in the history
Show top artist images even if no primary tag is found. Use tag if available.
  • Loading branch information
Chaphasilor authored Jan 1, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents 8488bc8 + 07381db commit 6c13150
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/jelly-helper.js
Original file line number Diff line number Diff line change
@@ -44,11 +44,17 @@ export default class JellyHelper {
})
}

if (primaryTag && (parentItemId || type === `user`)) {
let url = `${this.auth.config.serverInfo.PublicAddress}/Items/${parentItemId}/Images/Primary?tag=${primaryTag}&MaxWidth=${resolution}&MaxHeight=${resolution}`
if (parentItemId || type === `user`) {
let url = `${this.auth.config.serverInfo.PublicAddress}/Items/${parentItemId}/Images/Primary?MaxWidth=${resolution}&MaxHeight=${resolution}`

if (type === `user`) {
url = `${this.auth.config.serverInfo.PublicAddress}/Users/${parentItemId}/Images/Primary?tag=${primaryTag}&MaxWidth=${resolution}&MaxHeight=${resolution}`
url = `${this.auth.config.serverInfo.PublicAddress}/Users/${parentItemId}/Images/Primary?MaxWidth=${resolution}&MaxHeight=${resolution}`
}

if (primaryTag) {
url += `&tag=${primaryTag}`
}

fetch(url, {
method: `GET`,
headers: {

0 comments on commit 6c13150

Please sign in to comment.