Skip to content
Permalink
Browse files

fix for imagereel service variable type defect

  • Loading branch information...
shawnmjones committed May 28, 2019
1 parent fd060ff commit 6e63a1fa7809ee9b322f415b0a18b309793847f0
Showing with 17 additions and 8 deletions.
  1. +8 −8 mementoembed/services/product.py
  2. +9 −0 sample_appconfig.cfg
@@ -178,10 +178,10 @@ def generate_imagereel_response(urim, prefs):

data = mir.generate_imagereel(
urim,
prefs['duration'],
prefs['imagecount'],
prefs['width'],
prefs['height']
int(prefs['duration']),
int(prefs['imagecount']),
int(prefs['width']),
int(prefs['height'])
)

response = make_response(data)
@@ -223,10 +223,10 @@ def imagereel_endpoint(subpath):
urim = extract_urim_from_request_path(request.full_path, '/services/product/imagereel/')

prefs = {}
prefs['duration'] = current_app.config['IMAGEREEL_DURATION']
prefs['imagecount'] = current_app.config['IMAGEREEL_COUNT']
prefs['width'] = current_app.config['IMAGEREEL_WIDTH']
prefs['height'] = current_app.config['IMAGEREEL_HEIGHT']
prefs['duration'] = int(current_app.config['IMAGEREEL_DURATION'])
prefs['imagecount'] = int(current_app.config['IMAGEREEL_COUNT'])
prefs['width'] = int(current_app.config['IMAGEREEL_WIDTH'])
prefs['height'] = int(current_app.config['IMAGEREEL_HEIGHT'])

if 'Prefer' in request.headers:

@@ -96,3 +96,12 @@ IMAGEREEL_WORKING_FOLDER = "/app/imagereels"

# amount of time between image transitions, including fades
IMAGEREEL_DURATION = "100"

# width of the imagereel
IMAGEREEL_WIDTH = "320"

# height of the imagereel
IMAGEREEL_HEIGHT = "240"

# maximum number of images to include in image reel
IMAGEREEL_COUNT = "5"

0 comments on commit 6e63a1f

Please sign in to comment.
You can’t perform that action at this time.