mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 05:37:29 +02:00
Merge pull request #69 from Horrendus/master
fix grooveshark stuff by putting ifdefs around it
This commit is contained in:
@@ -101,7 +101,6 @@ set( libGuiSources
|
|||||||
utils/m3uloader.cpp
|
utils/m3uloader.cpp
|
||||||
utils/itunesparser.cpp
|
utils/itunesparser.cpp
|
||||||
utils/rdioparser.cpp
|
utils/rdioparser.cpp
|
||||||
utils/groovesharkparser.cpp
|
|
||||||
utils/shortenedlinkparser.cpp
|
utils/shortenedlinkparser.cpp
|
||||||
utils/stylehelper.cpp
|
utils/stylehelper.cpp
|
||||||
utils/dropjobnotifier.cpp
|
utils/dropjobnotifier.cpp
|
||||||
@@ -136,6 +135,10 @@ set( libGuiSources
|
|||||||
widgets/BreadcrumbButton.cpp
|
widgets/BreadcrumbButton.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
IF(QCA2_FOUND)
|
||||||
|
set( libGuiSources ${libGuiSources} utils/groovesharkparser.cpp )
|
||||||
|
ENDIF(QCA2_FOUND)
|
||||||
|
|
||||||
set( libGuiHeaders
|
set( libGuiHeaders
|
||||||
actioncollection.h
|
actioncollection.h
|
||||||
|
|
||||||
@@ -220,7 +223,6 @@ set( libGuiHeaders
|
|||||||
utils/m3uloader.h
|
utils/m3uloader.h
|
||||||
utils/itunesparser.h
|
utils/itunesparser.h
|
||||||
utils/rdioparser.h
|
utils/rdioparser.h
|
||||||
utils/groovesharkparser.h
|
|
||||||
utils/shortenedlinkparser.h
|
utils/shortenedlinkparser.h
|
||||||
utils/dropjobnotifier.h
|
utils/dropjobnotifier.h
|
||||||
utils/tomahawkutilsgui.h
|
utils/tomahawkutilsgui.h
|
||||||
@@ -264,9 +266,12 @@ set( libGuiHeaders
|
|||||||
jobview/LatchedStatusItem.h
|
jobview/LatchedStatusItem.h
|
||||||
|
|
||||||
thirdparty/Qocoa/qsearchfield.h
|
thirdparty/Qocoa/qsearchfield.h
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
IF(QCA2_FOUND)
|
||||||
|
set( libGuiHeaders ${libGuiHeaders} utils/groovesharkparser.h )
|
||||||
|
ENDIF(QCA2_FOUND)
|
||||||
|
|
||||||
set( libSources
|
set( libSources
|
||||||
tomahawksettings.cpp
|
tomahawksettings.cpp
|
||||||
sourcelist.cpp
|
sourcelist.cpp
|
||||||
|
@@ -26,7 +26,6 @@
|
|||||||
#include "utils/spotifyparser.h"
|
#include "utils/spotifyparser.h"
|
||||||
#include "utils/itunesparser.h"
|
#include "utils/itunesparser.h"
|
||||||
#include "utils/rdioparser.h"
|
#include "utils/rdioparser.h"
|
||||||
#include "utils/groovesharkparser.h"
|
|
||||||
#include "utils/m3uloader.h"
|
#include "utils/m3uloader.h"
|
||||||
#include "utils/shortenedlinkparser.h"
|
#include "utils/shortenedlinkparser.h"
|
||||||
#include "utils/logger.h"
|
#include "utils/logger.h"
|
||||||
@@ -36,6 +35,10 @@
|
|||||||
#include "utils/xspfloader.h"
|
#include "utils/xspfloader.h"
|
||||||
#include "jobview/JobStatusView.h"
|
#include "jobview/JobStatusView.h"
|
||||||
#include "jobview/JobStatusModel.h"
|
#include "jobview/JobStatusModel.h"
|
||||||
|
#ifdef QCA2_FOUND
|
||||||
|
#include "utils/groovesharkparser.h"
|
||||||
|
#endif //QCA2_FOUND
|
||||||
|
|
||||||
|
|
||||||
using namespace Tomahawk;
|
using namespace Tomahawk;
|
||||||
|
|
||||||
@@ -192,10 +195,10 @@ DropJob::isDropType( DropJob::DropType desired, const QMimeData* data )
|
|||||||
|
|
||||||
if ( url.contains( "rdio.com" ) && url.contains( "people" ) && url.contains( "playlist" ) )
|
if ( url.contains( "rdio.com" ) && url.contains( "people" ) && url.contains( "playlist" ) )
|
||||||
return true;
|
return true;
|
||||||
|
#ifdef QCA2_FOUND
|
||||||
if ( url.contains( "grooveshark.com" ) && url.contains( "playlist" ) )
|
if ( url.contains( "grooveshark.com" ) && url.contains( "playlist" ) )
|
||||||
return true;
|
return true;
|
||||||
|
#endif //QCA2_FOUND
|
||||||
if ( ShortenedLinkParser::handlesUrl( url ) )
|
if ( ShortenedLinkParser::handlesUrl( url ) )
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -565,6 +568,7 @@ DropJob::handleRdioUrls( const QString& urlsRaw )
|
|||||||
void
|
void
|
||||||
DropJob::handleGroovesharkUrls ( const QString& urlsRaw )
|
DropJob::handleGroovesharkUrls ( const QString& urlsRaw )
|
||||||
{
|
{
|
||||||
|
#ifdef QCA2_FOUND
|
||||||
QStringList urls = urlsRaw.split( QRegExp( "\\s+" ), QString::SkipEmptyParts );
|
QStringList urls = urlsRaw.split( QRegExp( "\\s+" ), QString::SkipEmptyParts );
|
||||||
tDebug() << "Got Grooveshark urls!" << urls;
|
tDebug() << "Got Grooveshark urls!" << urls;
|
||||||
|
|
||||||
@@ -580,6 +584,9 @@ DropJob::handleGroovesharkUrls ( const QString& urlsRaw )
|
|||||||
connect( groove, SIGNAL( tracks( QList<Tomahawk::query_ptr> ) ), this, SLOT( onTracksAdded( QList< Tomahawk::query_ptr > ) ) );
|
connect( groove, SIGNAL( tracks( QList<Tomahawk::query_ptr> ) ), this, SLOT( onTracksAdded( QList< Tomahawk::query_ptr > ) ) );
|
||||||
m_queryCount++;
|
m_queryCount++;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
tLog() << "Tomahawk compiled without QCA support, cannot use groovesharkparser";
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -597,8 +604,10 @@ DropJob::handleAllUrls( const QString& urls )
|
|||||||
handleSpotifyUrls( urls );
|
handleSpotifyUrls( urls );
|
||||||
else if ( urls.contains( "rdio.com" ) )
|
else if ( urls.contains( "rdio.com" ) )
|
||||||
handleRdioUrls( urls );
|
handleRdioUrls( urls );
|
||||||
|
#ifdef QCA2_FOUND
|
||||||
else if ( urls.contains( "grooveshark.com" ) )
|
else if ( urls.contains( "grooveshark.com" ) )
|
||||||
handleGroovesharkUrls( urls );
|
handleGroovesharkUrls( urls );
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
handleTrackUrls ( urls );
|
handleTrackUrls ( urls );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user