Skip to content

Commit

Permalink
refactor(view): fix redundant if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
bluenex committed Oct 13, 2020
1 parent ad4f0df commit e282e44
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions api/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,8 @@ def make_svg(artist_name, song_name, img, is_now_playing, cover_image, theme):
"cover_image": cover_image,
}

if theme == 'compact':
return render_template("spotify.compact.html.j2", **rendered_data)
elif theme == 'natemoo-re':
return render_template("spotify.natemoo-re.html.j2", **rendered_data)
elif theme == 'novatorem':
return render_template("spotify.novatorem.html.j2", **rendered_data)
if theme != 'default':
return render_template(f"spotify.{theme}.html.j2", **rendered_data)
else:
return render_template("spotify.html.j2", **rendered_data)

Expand Down

0 comments on commit e282e44

Please sign in to comment.