Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Gracefully handle missing song id

  • Loading branch information...
commit fc00bde3fbade5ff985cd6abfacc0e7ff0a1b69b 1 parent 1deda21
@dcramer authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  app/api/system.rb
View
3  app/api/system.rb
@@ -5,7 +5,8 @@ class App < Sinatra::Base
get "/images/art/:id.png" do
content_type 'image/png'
- if art = Song.find(params[:id]).album_art_data
+ song = Song.find(params[:id])
+ if song and art = song.album_art_data
response['Cache-Control'] = 'public, max-age=2500000'
etag params[:id]
art
Please sign in to comment.
Something went wrong with that request. Please try again.