mirror of
https://github.com/fallenbagel/jellyseerr.git
synced 2026-01-01 04:08:45 -05:00
fix(ui): fix Avatar being broken when setup using internal ip
allow avatar url to use externalHostname when setup using local ip fix #110
This commit is contained in:
@@ -494,6 +494,11 @@ router.post(
|
||||
|
||||
const jellyfinUsersResponse = await jellyfinClient.getUsers();
|
||||
const createdUsers: User[] = [];
|
||||
const { hostname, externalHostname } = getSettings().jellyfin;
|
||||
const jellyfinHost =
|
||||
externalHostname && externalHostname.length > 0
|
||||
? externalHostname
|
||||
: hostname;
|
||||
for (const account of jellyfinUsersResponse.users) {
|
||||
if (account.Name) {
|
||||
const user = await userRepository
|
||||
@@ -505,7 +510,7 @@ router.post(
|
||||
.getOne();
|
||||
|
||||
const avatar = account.PrimaryImageTag
|
||||
? `${settings.jellyfin.hostname}/Users/${account.Id}/Images/Primary/?tag=${account.PrimaryImageTag}&quality=90`
|
||||
? `${jellyfinHost}/Users/${account.Id}/Images/Primary/?tag=${account.PrimaryImageTag}&quality=90`
|
||||
: '/os_logo_square.png';
|
||||
|
||||
if (user) {
|
||||
|
||||
Reference in New Issue
Block a user