Skip to content

Commit

Permalink
Merge pull request #26 from kyan/fix_artwork_memory_bug
Browse files Browse the repository at this point in the history
Fix missing artwork bug
  • Loading branch information
Paul Sturgess committed Jul 9, 2015
2 parents 1bd2130 + b91e3e3 commit a1a6145
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app/_views/nowplaying_view.rb
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,7 @@ def update_addedby
end

def update_image
artwork_image = NSImage.imageNamed("missing_artwork.png")
@image.setImage(artwork_image)

set_missing_artwork
if !track.artwork_url.nil?
gcdq = Dispatch::Queue.new('com.kyan.kyanbar')
gcdq.async do
Expand All @@ -254,6 +252,12 @@ def update_image
end
end

def set_missing_artwork
@image.setImage(
NSImage.imageNamed("missing_artwork.png")
)
end

def update_votes
score = if valid_jb_data?(:rating)
rating.rating unless rating.nil?
Expand Down

0 comments on commit a1a6145

Please sign in to comment.