Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into dev
  • Loading branch information
Chaphasilor committed Jan 1, 2025
2 parents 58f8505 + 6c13150 commit 7a14a12
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
Expand Up @@ -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: {
Expand Down

0 comments on commit 7a14a12

Please sign in to comment.