|
@@ -49,15 +49,17 @@ def migrate_common_lib(values):
|
|
|
'plexID': {
|
|
|
# We didn't have exposed this on UI the default
|
|
|
# set by the container is 1000, so we will use that
|
|
|
- 'user': 1000,
|
|
|
- 'group': 1000,
|
|
|
+ # if the environmentVariables contains PLEX_UID/PLEX_GID use that
|
|
|
+ 'user': next((e['value'] for e in values.get('environmentVariables', []) if e['name'] == 'PLEX_UID'), 1000),
|
|
|
+ 'group': next((e['value'] for e in values.get('environmentVariables', []) if e['name'] == 'PLEX_GID'), 1000),
|
|
|
},
|
|
|
# Migrate Config
|
|
|
'TZ': values['timezone'],
|
|
|
'plexConfig': {
|
|
|
'imageSelector': 'plexPassImage' if values['enablePlexPass'] else 'image',
|
|
|
'claimToken': values['claimToken'],
|
|
|
- 'additionalEnvs': values.get('environmentVariables', []),
|
|
|
+ # Filter out the PLEX_UID and PLEX_GID
|
|
|
+ 'additionalEnvs': [e for e in values.get('environmentVariables', []) if e['name'] not in ['PLEX_UID', 'PLEX_GID'] ],
|
|
|
},
|
|
|
'plexGPU': values.get('gpuConfiguration', {}),
|
|
|
# Migrate Storage
|