1
0
mirror of https://github.com/strawberrymusicplayer/strawberry synced 2024-12-18 11:39:31 +01:00

Add back old MPEG::File::File constructor

The unit tests still uses it.

Fixes #650
This commit is contained in:
Jonas Kvinge 2021-02-15 21:47:50 +01:00
parent 3ff97e43e1
commit f908336ec6
2 changed files with 18 additions and 0 deletions

View File

@ -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())

View File

@ -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.