summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/playback.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/apps/playback.c b/apps/playback.c
index 59d70842ee..a56c6d17ec 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -1710,6 +1710,7 @@ static int audio_load_albumart(struct track_info *infop,
1710 struct bufopen_bitmap_data user_data; 1710 struct bufopen_bitmap_data user_data;
1711 int *aa_hid = &infop->aa_hid[i]; 1711 int *aa_hid = &infop->aa_hid[i];
1712 int hid = ERR_UNSUPPORTED_TYPE; 1712 int hid = ERR_UNSUPPORTED_TYPE;
1713 bool checked_image_file = false;
1713 1714
1714 /* albumart_slots may change during a yield of bufopen, 1715 /* albumart_slots may change during a yield of bufopen,
1715 * but that's no problem */ 1716 * but that's no problem */
@@ -1721,12 +1722,15 @@ static int audio_load_albumart(struct track_info *infop,
1721 user_data.dim = &albumart_slots[i].dim; 1722 user_data.dim = &albumart_slots[i].dim;
1722 1723
1723 char path[MAX_PATH]; 1724 char path[MAX_PATH];
1724 if(global_settings.album_art == AA_PREFER_IMAGE_FILE && 1725 if(global_settings.album_art == AA_PREFER_IMAGE_FILE)
1725 find_albumart(track_id3, path, sizeof(path),
1726 &albumart_slots[i].dim))
1727 { 1726 {
1727 if (find_albumart(track_id3, path, sizeof(path),
1728 &albumart_slots[i].dim))
1729 {
1728 user_data.embedded_albumart = NULL; 1730 user_data.embedded_albumart = NULL;
1729 hid = bufopen(path, 0, TYPE_BITMAP, &user_data); 1731 hid = bufopen(path, 0, TYPE_BITMAP, &user_data);
1732 }
1733 checked_image_file = true;
1730 } 1734 }
1731 1735
1732 /* We can only decode jpeg for embedded AA */ 1736 /* We can only decode jpeg for embedded AA */
@@ -1738,7 +1742,7 @@ static int audio_load_albumart(struct track_info *infop,
1738 hid = bufopen(track_id3->path, 0, TYPE_BITMAP, &user_data); 1742 hid = bufopen(track_id3->path, 0, TYPE_BITMAP, &user_data);
1739 } 1743 }
1740 1744
1741 if (global_settings.album_art != AA_OFF && 1745 if (global_settings.album_art != AA_OFF && !checked_image_file &&
1742 hid < 0 && hid != ERR_BUFFER_FULL) 1746 hid < 0 && hid != ERR_BUFFER_FULL)
1743 { 1747 {
1744 /* No embedded AA or it couldn't be loaded - try other sources */ 1748 /* No embedded AA or it couldn't be loaded - try other sources */