From kde-commits Thu Dec 19 05:58:34 2013 From: Mark Kretschmann Date: Thu, 19 Dec 2013 05:58:34 +0000 To: kde-commits Subject: [amarok] /: Fetch cover picture from METADATA_BLOCK_PICTURE tag. Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=138743273210416 Git commit 19fc23445bdb2da894ad6ca4096236de2e9fcb1f by Mark Kretschmann, on= behalf of Martin Brodbeck. Committed on 19/12/2013 at 05:48. Pushed by markey into branch 'master'. Fetch cover picture from METADATA_BLOCK_PICTURE tag. With this patch, covers from Ogg files (for example Vorbis and Opus) using the recommended METADATA_BLOCK_PICTURE tag will be displayed. BUG: 328451 FIXED-IN: 2.9 REVIEW: 114406 M +2 -0 ChangeLog M +4 -1 shared/tag_helpers/VorbisCommentTagHelper.cpp http://commits.kde.org/amarok/19fc23445bdb2da894ad6ca4096236de2e9fcb1f diff --git a/ChangeLog b/ChangeLog index 5ff5b2b..ba85b4d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,8 @@ VERSION 2.9-Beta 1 compilers currently supported by KDE. = BUGFIXES: + * Also fetch cover art from xiph-comments with METADATA_BLOCK_PICTURE t= ag. + Patch by Martin Brodbeck . (BR 328451) * Fix crash on quit when Amarok is in the middle of fadeout. (BR 325723) * Prevent shared memory size errors for very large collections. (BR 327= 812) * Fix OpenGL related crash. (BR 327150) diff --git a/shared/tag_helpers/VorbisCommentTagHelper.cpp b/shared/tag_hel= pers/VorbisCommentTagHelper.cpp index dc02a1c..f3ff542 100644 --- a/shared/tag_helpers/VorbisCommentTagHelper.cpp +++ b/shared/tag_helpers/VorbisCommentTagHelper.cpp @@ -253,7 +253,10 @@ VorbisCommentTagHelper::embeddedCover() const } else if( m_tag->fieldListMap().contains( VORBIS_PICTURE_TAG ) ) { - parsePictureBlock( m_tag->fieldListMap()[ VORBIS_PICTURE_TAG ] ); + QImage resultCover; + parsePictureBlock( m_tag->fieldListMap()[ VORBIS_PICTURE_TAG ], &r= esultCover ); + if( cover.isNull() && !resultCover.isNull() ) + cover =3D resultCover; } else if( !fieldName( Meta::valHasCover ).isEmpty() ) {