From f908336ec6aba0af08ef14e66449ac59171fe91e Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Mon, 15 Feb 2021 21:47:50 +0100 Subject: [PATCH] Add back old MPEG::File::File constructor The unit tests still uses it. Fixes #650 --- 3rdparty/taglib/mpeg/mpegfile.cpp | 7 +++++++ 3rdparty/taglib/mpeg/mpegfile.h | 11 +++++++++++ 2 files changed, 18 insertions(+) diff --git a/3rdparty/taglib/mpeg/mpegfile.cpp b/3rdparty/taglib/mpeg/mpegfile.cpp index fa9920cf..2f014e4a 100644 --- a/3rdparty/taglib/mpeg/mpegfile.cpp +++ b/3rdparty/taglib/mpeg/mpegfile.cpp @@ -132,6 +132,13 @@ bool MPEG::File::isSupported(IOStream *stream) { //////////////////////////////////////////////////////////////////////////////// +MPEG::File::File(FileName fileName, bool readProperties, AudioProperties::ReadStyle) : Strawberry_TagLib::TagLib::File(fileName), d(new FilePrivate()) { + + if (isOpen()) + read(readProperties); + +} + MPEG::File::File(FileName fileName, ID3v2::FrameFactory *frameFactory, bool readProperties, AudioProperties::ReadStyle) : Strawberry_TagLib::TagLib::File(fileName), d(new FilePrivate(frameFactory)) { if (isOpen()) diff --git a/3rdparty/taglib/mpeg/mpegfile.h b/3rdparty/taglib/mpeg/mpegfile.h index fe4cf085..0399726e 100644 --- a/3rdparty/taglib/mpeg/mpegfile.h +++ b/3rdparty/taglib/mpeg/mpegfile.h @@ -78,6 +78,17 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File { AllTags = 0xffff }; + /*! + * Constructs an MPEG file from \a file. If \a readProperties is true the + * file's audio properties will also be read. + * + * \note In the current implementation, \a propertiesStyle is ignored. + * + * \deprecated This constructor will be dropped in favor of the one below + * in a future version. + */ + explicit File(FileName file, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); + /*! * Constructs an MPEG file from \a file. * If \a readProperties is true the file's audio properties will also be read.