summaryrefslogtreecommitdiff
path: root/plugins/artwork
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <waker@users.sourceforge.net>2013-10-19 21:34:47 +0200
committerGravatar Alexey Yakovenko <waker@users.sourceforge.net>2013-10-19 21:34:47 +0200
commit956cb324c94d4062408d73ee8bf005b9e6ea3ec2 (patch)
tree9048816df51767507067a0da971c6012fe9e9da1 /plugins/artwork
parent517500d17fda204dead342b966a9c5b3a9ad9edc (diff)
artwork: improved album art fetching from last.fm
Diffstat (limited to 'plugins/artwork')
-rw-r--r--plugins/artwork/artwork.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/plugins/artwork/artwork.c b/plugins/artwork/artwork.c
index facfd486..44aa68dc 100644
--- a/plugins/artwork/artwork.c
+++ b/plugins/artwork/artwork.c
@@ -1144,8 +1144,21 @@ fetcher_thread (void *none)
got_pic = 1;
}
}
- if (!got_pic && artwork_enable_lfm && !fetch_from_lastfm (param->artist, param->album, cache_path)) {
- got_pic = 1;
+ if (!got_pic && artwork_enable_lfm) {
+ if (!fetch_from_lastfm (param->artist, param->album, cache_path)) {
+ got_pic = 1;
+ }
+ else {
+ // try to fix parentheses
+ char *fixed_alb = strdupa (param->album);
+ char *openp = strchr (fixed_alb, '(');
+ if (openp && openp != fixed_alb) {
+ *openp = 0;
+ if (!fetch_from_lastfm (param->artist, fixed_alb, cache_path)) {
+ got_pic = 1;
+ }
+ }
+ }
}
if (!got_pic && artwork_enable_aao && !fetch_from_albumart_org (param->artist, param->album, cache_path)) {
got_pic = 1;