mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-12 09:04:33 +02:00
Add Opus support
* requires TagLib 1.9
This commit is contained in:
@@ -25,6 +25,7 @@ Version 0.8.0:
|
|||||||
* Improved error messages.
|
* Improved error messages.
|
||||||
* Support drag & drop of items from Artist and Album page headers.
|
* Support drag & drop of items from Artist and Album page headers.
|
||||||
* Added basic remote control API
|
* Added basic remote control API
|
||||||
|
* Add support for Opus codec in local files (requires TagLib 1.9)
|
||||||
|
|
||||||
Version 0.7.0:
|
Version 0.7.0:
|
||||||
* JavaScript Resolvers can now expose collections.
|
* JavaScript Resolvers can now expose collections.
|
||||||
|
@@ -35,7 +35,6 @@
|
|||||||
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
|
|
||||||
|
|
||||||
using namespace Tomahawk;
|
using namespace Tomahawk;
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -143,6 +142,9 @@ MusicScanner::MusicScanner( MusicScanner::ScanMode scanMode, const QStringList&
|
|||||||
m_ext2mime.insert( "mp3", TomahawkUtils::extensionToMimetype( "mp3" ) );
|
m_ext2mime.insert( "mp3", TomahawkUtils::extensionToMimetype( "mp3" ) );
|
||||||
m_ext2mime.insert( "ogg", TomahawkUtils::extensionToMimetype( "ogg" ) );
|
m_ext2mime.insert( "ogg", TomahawkUtils::extensionToMimetype( "ogg" ) );
|
||||||
m_ext2mime.insert( "oga", TomahawkUtils::extensionToMimetype( "oga" ) );
|
m_ext2mime.insert( "oga", TomahawkUtils::extensionToMimetype( "oga" ) );
|
||||||
|
#if TAGLIB_MAJOR_VERSION >= 1 && TAGLIB_MINOR_VERSION >= 9
|
||||||
|
m_ext2mime.insert( "opus", TomahawkUtils::extensionToMimetype( "opus" ) );
|
||||||
|
#endif
|
||||||
m_ext2mime.insert( "mpc", TomahawkUtils::extensionToMimetype( "mpc" ) );
|
m_ext2mime.insert( "mpc", TomahawkUtils::extensionToMimetype( "mpc" ) );
|
||||||
m_ext2mime.insert( "wma", TomahawkUtils::extensionToMimetype( "wma" ) );
|
m_ext2mime.insert( "wma", TomahawkUtils::extensionToMimetype( "wma" ) );
|
||||||
m_ext2mime.insert( "aac", TomahawkUtils::extensionToMimetype( "aac" ) );
|
m_ext2mime.insert( "aac", TomahawkUtils::extensionToMimetype( "aac" ) );
|
||||||
|
@@ -28,6 +28,9 @@
|
|||||||
#include <taglib/xiphcomment.h>
|
#include <taglib/xiphcomment.h>
|
||||||
#include <taglib/vorbisfile.h>
|
#include <taglib/vorbisfile.h>
|
||||||
#include <taglib/oggflacfile.h>
|
#include <taglib/oggflacfile.h>
|
||||||
|
#if TAGLIB_MAJOR_VERSION >= 1 && TAGLIB_MINOR_VERSION >= 9
|
||||||
|
#include <taglib/opusfile.h>
|
||||||
|
#endif
|
||||||
#include <taglib/flacfile.h>
|
#include <taglib/flacfile.h>
|
||||||
#include <taglib/speexfile.h>
|
#include <taglib/speexfile.h>
|
||||||
#include <taglib/mpegfile.h>
|
#include <taglib/mpegfile.h>
|
||||||
@@ -58,6 +61,16 @@ namespace Tomahawk
|
|||||||
if( file->tag() )
|
if( file->tag() )
|
||||||
t = new OggTag( f.tag(), file->tag() );
|
t = new OggTag( f.tag(), file->tag() );
|
||||||
}
|
}
|
||||||
|
#if TAGLIB_MAJOR_VERSION >= 1 && TAGLIB_MINOR_VERSION >= 9
|
||||||
|
else if ( TagLib::Ogg::Opus::File *file =
|
||||||
|
dynamic_cast< TagLib::Ogg::Opus::File * >( f.file() ) )
|
||||||
|
{
|
||||||
|
if ( file->tag() )
|
||||||
|
{
|
||||||
|
t = new OggTag( f.tag(), file->tag() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
else if( TagLib::RIFF::AIFF::File *file =
|
else if( TagLib::RIFF::AIFF::File *file =
|
||||||
dynamic_cast< TagLib::RIFF::AIFF::File * >( f.file() ) )
|
dynamic_cast< TagLib::RIFF::AIFF::File * >( f.file() ) )
|
||||||
{
|
{
|
||||||
|
@@ -322,6 +322,9 @@ extensionToMimetype( const QString& extension )
|
|||||||
s_ext2mime.insert( "mp3", "audio/mpeg" );
|
s_ext2mime.insert( "mp3", "audio/mpeg" );
|
||||||
s_ext2mime.insert( "ogg", "application/ogg" );
|
s_ext2mime.insert( "ogg", "application/ogg" );
|
||||||
s_ext2mime.insert( "oga", "application/ogg" );
|
s_ext2mime.insert( "oga", "application/ogg" );
|
||||||
|
#if TAGLIB_MAJOR_VERSION >= 1 && TAGLIB_MINOR_VERSION >= 9
|
||||||
|
s_ext2mime.insert( "opus", "application/opus" );
|
||||||
|
#endif
|
||||||
s_ext2mime.insert( "mpc", "audio/x-musepack" );
|
s_ext2mime.insert( "mpc", "audio/x-musepack" );
|
||||||
s_ext2mime.insert( "wma", "audio/x-ms-wma" );
|
s_ext2mime.insert( "wma", "audio/x-ms-wma" );
|
||||||
s_ext2mime.insert( "aac", "audio/mp4" );
|
s_ext2mime.insert( "aac", "audio/mp4" );
|
||||||
|
Reference in New Issue
Block a user