Skip to content

Commit

Permalink
Add support for radio covers
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-yakushev committed Jun 25, 2014
1 parent 00f26f4 commit f528a02
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions awesompd.lua
Expand Up @@ -1149,8 +1149,17 @@ end
-- folders. If there is no cover art either returns the default album
-- cover.
function awesompd:get_cover(track)
return jamendo.try_get_cover(track) or
self:try_get_local_cover(track) or self.ICONS.DEFAULT_ALBUM_COVER
local radio_cover = nil
if self.radio_covers then
for station, cover in pairs(self.radio_covers) do
if track:match(station) then
radio_cover = cover
break
end
end
end
return radio_cover or jamendo.try_get_cover(track) or
self:try_get_local_cover(track) or self.ICONS.DEFAULT_ALBUM_COVER
end

-- Tries to find an album cover for the track that is currently
Expand Down

0 comments on commit f528a02

Please sign in to comment.