Merge lp:~michihenning/thumbnailer/zesty-test-suppression into lp:thumbnailer

Proposed by Michi Henning
Status: Merged
Approved by: Michi Henning
Approved revision: 377
Merged at revision: 153
Proposed branch: lp:~michihenning/thumbnailer/zesty-test-suppression
Merge into: lp:thumbnailer
Diff against target: 104 lines (+35/-3)
3 files modified
CMakeLists.txt (+1/-3)
debian/changelog (+8/-0)
src/local_album_art.cpp (+26/-0)
To merge this branch: bzr merge lp:~michihenning/thumbnailer/zesty-test-suppression
Reviewer Review Type Date Requested Status
Michi Henning (community) Approve
James Henstridge Approve
Review via email: mp+310376@code.launchpad.net

Commit message

Added zesty to list of distros for which we suppress Qt-related tests.
Fixed code to work with taglib 1.11, which breaks the behavior of the taglib 1.9 API.

Description of the change

Added zesty to list of distros for which we suppress Qt-related tests.

To post a comment you must log in.
Revision history for this message
James Henstridge (jamesh) wrote :

Looks good, although we'll need to find a real solution soon as we begin to rely more on Xenial.

review: Approve
Revision history for this message
Michi Henning (michihenning) wrote :

Re-approving. The only change since James's approval is the merged changelog and that the builders have reverted back to leveldb 1.18.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2016-09-26 00:50:50 +0000
+++ CMakeLists.txt 2016-11-14 01:06:24 +0000
@@ -88,10 +88,8 @@
88if (${skip-dbus-tests})88if (${skip-dbus-tests})
89 execute_process(COMMAND lsb_release -s -c OUTPUT_VARIABLE distro OUTPUT_STRIP_TRAILING_WHITESPACE)89 execute_process(COMMAND lsb_release -s -c OUTPUT_VARIABLE distro OUTPUT_STRIP_TRAILING_WHITESPACE)
90 execute_process(COMMAND uname -m OUTPUT_VARIABLE arch OUTPUT_STRIP_TRAILING_WHITESPACE)90 execute_process(COMMAND uname -m OUTPUT_VARIABLE arch OUTPUT_STRIP_TRAILING_WHITESPACE)
91 message("DISTRO: ${distro}")
92 message("ARCH: ${arch}")
93 if (91 if (
94 (${distro} STREQUAL "xenial" OR ${distro} STREQUAL "yakkety")92 (${distro} STREQUAL "xenial" OR ${distro} STREQUAL "yakkety" OR ${distro} STREQUAL "zesty")
95 AND93 AND
96 (${arch} STREQUAL "aarch64" OR ${arch} STREQUAL "ppc" OR ${arch} STREQUAL "ppc64le")94 (${arch} STREQUAL "aarch64" OR ${arch} STREQUAL "ppc" OR ${arch} STREQUAL "ppc64le")
97 )95 )
9896
=== modified file 'debian/changelog'
--- debian/changelog 2016-11-14 00:40:33 +0000
+++ debian/changelog 2016-11-14 01:06:24 +0000
@@ -1,3 +1,11 @@
1thumbnailer (2.4+16.10.20160926.2-0ubuntu3) UNRELEASED; urgency=medium
2
3 * Added zesty to list of distros for which we suppress Qt tests.
4 * Fixed code to work with taglib 1.11, which breaks the behavior
5 of the taglib 1.9 API.
6
7 -- Michi Henning <michi.henning@canonical.com> Mon, 14 Nov 2016 10:42:27 +1000
8
1thumbnailer (2.4+16.10.20160926.2-0ubuntu2) zesty; urgency=high9thumbnailer (2.4+16.10.20160926.2-0ubuntu2) zesty; urgency=high
210
3 * No change rebuild against boost1.62.11 * No change rebuild against boost1.62.
412
=== modified file 'src/local_album_art.cpp'
--- src/local_album_art.cpp 2016-02-24 06:56:01 +0000
+++ src/local_album_art.cpp 2016-11-14 01:06:24 +0000
@@ -18,7 +18,12 @@
1818
19#include <internal/local_album_art.h>19#include <internal/local_album_art.h>
2020
21#include <taglib/taglib.h>
22
23#if TAGLIB_MAJOR_VERSION == 1 && TAGLIB_MINOR_VERSION <= 9
24#define TAGLIB_1_9 1
21#include <QByteArray>25#include <QByteArray>
26#endif
2227
23#include <taglib/attachedpictureframe.h>28#include <taglib/attachedpictureframe.h>
24#include <taglib/fileref.h>29#include <taglib/fileref.h>
@@ -179,6 +184,11 @@
179 return dynamic_cast<TagLib::Ogg::XiphComment*>(fileref_.tag());184 return dynamic_cast<TagLib::Ogg::XiphComment*>(fileref_.tag());
180}185}
181186
187namespace
188{
189
190#if TAGLIB_1_9
191
182// Decode base_64 string into a QByteArray192// Decode base_64 string into a QByteArray
183193
184QByteArray decode_b64(TagLib::String const& base_64)194QByteArray decode_b64(TagLib::String const& base_64)
@@ -210,6 +220,8 @@
210 return unique_ptr<TagLib::FLAC::Picture>(new TagLib::FLAC::Picture(byte_vector));220 return unique_ptr<TagLib::FLAC::Picture>(new TagLib::FLAC::Picture(byte_vector));
211}221}
212222
223#endif
224
213// Helper function to pull cover (or other) art from a TagLib::FLAC::Picture.225// Helper function to pull cover (or other) art from a TagLib::FLAC::Picture.
214// Returns true if an image was extracted and that image is the front cover.226// Returns true if an image was extracted and that image is the front cover.
215// Otherwise, returns false and the art string is either set to some other227// Otherwise, returns false and the art string is either set to some other
@@ -246,6 +258,8 @@
246 return false;258 return false;
247}259}
248260
261} // namespace
262
249string OggExtractor::get_album_art() const263string OggExtractor::get_album_art() const
250{264{
251 string art;265 string art;
@@ -253,6 +267,8 @@
253 auto const xc = get_xiph_comment();267 auto const xc = get_xiph_comment();
254 if (xc)268 if (xc)
255 {269 {
270#if TAGLIB_1_9
271 // taglib 1.11 added a new API, and broke the behavior of the existing one.
256 auto const& map = xc->fieldListMap();272 auto const& map = xc->fieldListMap();
257 auto it = map.find("METADATA_BLOCK_PICTURE");273 auto it = map.find("METADATA_BLOCK_PICTURE");
258 if (it != map.end())274 if (it != map.end())
@@ -276,6 +292,16 @@
276 art = decode_b64(it->second.front()).toStdString();292 art = decode_b64(it->second.front()).toStdString();
277 }293 }
278 }294 }
295#else
296 auto piclist = xc->pictureList();
297 for (auto const& pic : piclist)
298 {
299 if (extract_flac_art(pic, art))
300 {
301 break;
302 }
303 }
304#endif
279 }305 }
280306
281 return art;307 return art;

Subscribers

People subscribed via source and target branches

to all changes: