1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-17 11:30:49 +02:00

Make TAGLIB #if checks backwards compatible

This commit is contained in:
Uwe L. Korn
2014-03-20 19:37:57 +00:00
parent 98656205df
commit c2961edc12
3 changed files with 11 additions and 2 deletions

View File

@@ -142,8 +142,10 @@ MusicScanner::MusicScanner( MusicScanner::ScanMode scanMode, const QStringList&
m_ext2mime.insert( "mp3", TomahawkUtils::extensionToMimetype( "mp3" ) );
m_ext2mime.insert( "ogg", TomahawkUtils::extensionToMimetype( "ogg" ) );
m_ext2mime.insert( "oga", TomahawkUtils::extensionToMimetype( "oga" ) );
#if defined(TAGLIB_MAJOR_VERSION) && defined(TAGLIB_MINOR_VERSION)
#if TAGLIB_MAJOR_VERSION >= 1 && TAGLIB_MINOR_VERSION >= 9
m_ext2mime.insert( "opus", TomahawkUtils::extensionToMimetype( "opus" ) );
#endif
#endif
m_ext2mime.insert( "mpc", TomahawkUtils::extensionToMimetype( "mpc" ) );
m_ext2mime.insert( "wma", TomahawkUtils::extensionToMimetype( "wma" ) );

View File

@@ -28,9 +28,11 @@
#include <taglib/xiphcomment.h>
#include <taglib/vorbisfile.h>
#include <taglib/oggflacfile.h>
#if defined(TAGLIB_MAJOR_VERSION) && defined(TAGLIB_MINOR_VERSION)
#if TAGLIB_MAJOR_VERSION >= 1 && TAGLIB_MINOR_VERSION >= 9
#include <taglib/opusfile.h>
#endif
#endif
#include <taglib/flacfile.h>
#include <taglib/speexfile.h>
#include <taglib/mpegfile.h>

View File

@@ -38,6 +38,9 @@
#include <quazip/quazip.h>
#include <quazip/quazipfile.h>
// We need this for the version info (if available)
#include <taglib/taglib.h>
#include <QNetworkConfiguration>
#include <QNetworkAccessManager>
#include <QNetworkProxy>
@@ -322,8 +325,10 @@ extensionToMimetype( const QString& extension )
s_ext2mime.insert( "mp3", "audio/mpeg" );
s_ext2mime.insert( "ogg", "application/ogg" );
s_ext2mime.insert( "oga", "application/ogg" );
#if defined(TAGLIB_MAJOR_VERSION) && defined(TAGLIB_MINOR_VERSION)
#if TAGLIB_MAJOR_VERSION >= 1 && TAGLIB_MINOR_VERSION >= 9
s_ext2mime.insert( "opus", "application/opus" );
#endif
#endif
s_ext2mime.insert( "mpc", "audio/x-musepack" );
s_ext2mime.insert( "wma", "audio/x-ms-wma" );