mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 13:47:26 +02:00
* Hopefully the last set of debug spam cleanup :-)
This commit is contained in:
@@ -70,10 +70,10 @@ ACLSystem::~ACLSystem()
|
|||||||
ACLSystem::ACL
|
ACLSystem::ACL
|
||||||
ACLSystem::isAuthorizedUser( const QString& dbid )
|
ACLSystem::isAuthorizedUser( const QString& dbid )
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
// qDebug() << Q_FUNC_INFO;
|
||||||
QMutexLocker locker( &m_cacheMutex );
|
QMutexLocker locker( &m_cacheMutex );
|
||||||
qDebug() << "Current cache keys = " << m_cache.keys();
|
qDebug() << "Current cache keys =" << m_cache.keys();
|
||||||
qDebug() << "Looking up dbid";
|
// qDebug() << "Looking up dbid";
|
||||||
if( !m_cache.contains( dbid ) )
|
if( !m_cache.contains( dbid ) )
|
||||||
return ACLSystem::NotFound;
|
return ACLSystem::NotFound;
|
||||||
else
|
else
|
||||||
@@ -88,7 +88,7 @@ ACLSystem::isAuthorizedUser( const QString& dbid )
|
|||||||
void
|
void
|
||||||
ACLSystem::authorizeUser( const QString& dbid, ACLSystem::ACL globalType )
|
ACLSystem::authorizeUser( const QString& dbid, ACLSystem::ACL globalType )
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
// qDebug() << Q_FUNC_INFO;
|
||||||
if( globalType == ACLSystem::NotFound )
|
if( globalType == ACLSystem::NotFound )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@@ -185,7 +185,7 @@ Collection::station( const QString& guid )
|
|||||||
void
|
void
|
||||||
Collection::setPlaylists( const QList<Tomahawk::playlist_ptr>& plists )
|
Collection::setPlaylists( const QList<Tomahawk::playlist_ptr>& plists )
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO << plists.count();
|
// qDebug() << Q_FUNC_INFO << plists.count();
|
||||||
foreach ( const playlist_ptr& p, plists )
|
foreach ( const playlist_ptr& p, plists )
|
||||||
{
|
{
|
||||||
// qDebug() << "Batch inserting playlist:" << p->guid();
|
// qDebug() << "Batch inserting playlist:" << p->guid();
|
||||||
@@ -198,7 +198,7 @@ Collection::setPlaylists( const QList<Tomahawk::playlist_ptr>& plists )
|
|||||||
void
|
void
|
||||||
Collection::setAutoPlaylists( const QList< Tomahawk::dynplaylist_ptr >& plists )
|
Collection::setAutoPlaylists( const QList< Tomahawk::dynplaylist_ptr >& plists )
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO << plists.count();
|
// qDebug() << Q_FUNC_INFO << plists.count();
|
||||||
|
|
||||||
foreach ( const dynplaylist_ptr& p, plists )
|
foreach ( const dynplaylist_ptr& p, plists )
|
||||||
{
|
{
|
||||||
@@ -212,7 +212,7 @@ Collection::setAutoPlaylists( const QList< Tomahawk::dynplaylist_ptr >& plists )
|
|||||||
void
|
void
|
||||||
Collection::setStations( const QList< dynplaylist_ptr >& stations )
|
Collection::setStations( const QList< dynplaylist_ptr >& stations )
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO << stations.count();
|
// qDebug() << Q_FUNC_INFO << stations.count();
|
||||||
|
|
||||||
foreach ( const dynplaylist_ptr& s, stations )
|
foreach ( const dynplaylist_ptr& s, stations )
|
||||||
{
|
{
|
||||||
@@ -226,7 +226,7 @@ Collection::setStations( const QList< dynplaylist_ptr >& stations )
|
|||||||
void
|
void
|
||||||
Collection::setTracks( const QList<Tomahawk::query_ptr>& tracks )
|
Collection::setTracks( const QList<Tomahawk::query_ptr>& tracks )
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO << tracks.count() << name();
|
// qDebug() << Q_FUNC_INFO << tracks.count() << name();
|
||||||
|
|
||||||
m_tracks << tracks;
|
m_tracks << tracks;
|
||||||
emit tracksAdded( tracks );
|
emit tracksAdded( tracks );
|
||||||
|
@@ -38,7 +38,6 @@ DatabaseCollection::DatabaseCollection( const source_ptr& src, QObject* parent )
|
|||||||
void
|
void
|
||||||
DatabaseCollection::loadPlaylists()
|
DatabaseCollection::loadPlaylists()
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
|
||||||
DatabaseCommand_LoadAllPlaylists* cmd = new DatabaseCommand_LoadAllPlaylists( source() );
|
DatabaseCommand_LoadAllPlaylists* cmd = new DatabaseCommand_LoadAllPlaylists( source() );
|
||||||
|
|
||||||
connect( cmd, SIGNAL( done( const QList<Tomahawk::playlist_ptr>& ) ),
|
connect( cmd, SIGNAL( done( const QList<Tomahawk::playlist_ptr>& ) ),
|
||||||
@@ -51,7 +50,6 @@ DatabaseCollection::loadPlaylists()
|
|||||||
void
|
void
|
||||||
DatabaseCollection::loadAutoPlaylists()
|
DatabaseCollection::loadAutoPlaylists()
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
|
||||||
DatabaseCommand_LoadAllAutoPlaylists* cmd = new DatabaseCommand_LoadAllAutoPlaylists( source() );
|
DatabaseCommand_LoadAllAutoPlaylists* cmd = new DatabaseCommand_LoadAllAutoPlaylists( source() );
|
||||||
|
|
||||||
connect( cmd, SIGNAL( autoPlaylistLoaded( Tomahawk::source_ptr, QVariantList ) ),
|
connect( cmd, SIGNAL( autoPlaylistLoaded( Tomahawk::source_ptr, QVariantList ) ),
|
||||||
@@ -60,10 +58,10 @@ DatabaseCollection::loadAutoPlaylists()
|
|||||||
Database::instance()->enqueue( QSharedPointer<DatabaseCommand>( cmd ) );
|
Database::instance()->enqueue( QSharedPointer<DatabaseCommand>( cmd ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
DatabaseCollection::loadStations()
|
DatabaseCollection::loadStations()
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
|
||||||
DatabaseCommand_LoadAllStations* cmd = new DatabaseCommand_LoadAllStations( source() );
|
DatabaseCommand_LoadAllStations* cmd = new DatabaseCommand_LoadAllStations( source() );
|
||||||
|
|
||||||
connect( cmd, SIGNAL( stationLoaded( Tomahawk::source_ptr, QVariantList ) ),
|
connect( cmd, SIGNAL( stationLoaded( Tomahawk::source_ptr, QVariantList ) ),
|
||||||
@@ -110,8 +108,6 @@ DatabaseCollection::removeTracks( const QDir& dir )
|
|||||||
QList< Tomahawk::playlist_ptr >
|
QList< Tomahawk::playlist_ptr >
|
||||||
DatabaseCollection::playlists()
|
DatabaseCollection::playlists()
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
|
||||||
|
|
||||||
if ( Collection::playlists().isEmpty() )
|
if ( Collection::playlists().isEmpty() )
|
||||||
{
|
{
|
||||||
loadPlaylists();
|
loadPlaylists();
|
||||||
@@ -124,8 +120,6 @@ DatabaseCollection::playlists()
|
|||||||
QList< dynplaylist_ptr >
|
QList< dynplaylist_ptr >
|
||||||
DatabaseCollection::autoPlaylists()
|
DatabaseCollection::autoPlaylists()
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
|
||||||
|
|
||||||
if ( Collection::autoPlaylists().isEmpty() )
|
if ( Collection::autoPlaylists().isEmpty() )
|
||||||
{
|
{
|
||||||
loadAutoPlaylists();
|
loadAutoPlaylists();
|
||||||
@@ -134,11 +128,10 @@ DatabaseCollection::autoPlaylists()
|
|||||||
return Collection::autoPlaylists();
|
return Collection::autoPlaylists();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QList< dynplaylist_ptr >
|
QList< dynplaylist_ptr >
|
||||||
DatabaseCollection::stations()
|
DatabaseCollection::stations()
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
|
||||||
|
|
||||||
if ( Collection::stations().isEmpty() )
|
if ( Collection::stations().isEmpty() )
|
||||||
{
|
{
|
||||||
loadStations();
|
loadStations();
|
||||||
@@ -151,8 +144,6 @@ DatabaseCollection::stations()
|
|||||||
QList< Tomahawk::query_ptr >
|
QList< Tomahawk::query_ptr >
|
||||||
DatabaseCollection::tracks()
|
DatabaseCollection::tracks()
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
|
||||||
|
|
||||||
if ( !isLoaded() )
|
if ( !isLoaded() )
|
||||||
{
|
{
|
||||||
loadTracks();
|
loadTracks();
|
||||||
@@ -161,6 +152,7 @@ DatabaseCollection::tracks()
|
|||||||
return Collection::tracks();
|
return Collection::tracks();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DatabaseCollection::autoPlaylistCreated( const source_ptr& source, const QVariantList& data )
|
void DatabaseCollection::autoPlaylistCreated( const source_ptr& source, const QVariantList& data )
|
||||||
{
|
{
|
||||||
dynplaylist_ptr p( new DynamicPlaylist( source, //src
|
dynplaylist_ptr p( new DynamicPlaylist( source, //src
|
||||||
@@ -177,6 +169,7 @@ void DatabaseCollection::autoPlaylistCreated( const source_ptr& source, const QV
|
|||||||
addAutoPlaylist( p );
|
addAutoPlaylist( p );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DatabaseCollection::stationCreated( const source_ptr& source, const QVariantList& data )
|
void DatabaseCollection::stationCreated( const source_ptr& source, const QVariantList& data )
|
||||||
{
|
{
|
||||||
dynplaylist_ptr p( new DynamicPlaylist( source, //src
|
dynplaylist_ptr p( new DynamicPlaylist( source, //src
|
||||||
|
@@ -35,8 +35,9 @@ class DatabaseCommand_LoadDynamicPlaylist : public DatabaseCommand_LoadPlaylistE
|
|||||||
public:
|
public:
|
||||||
explicit DatabaseCommand_LoadDynamicPlaylist( QString revision_guid, QObject* parent = 0 )
|
explicit DatabaseCommand_LoadDynamicPlaylist( QString revision_guid, QObject* parent = 0 )
|
||||||
: DatabaseCommand_LoadPlaylistEntries( revision_guid, parent )
|
: DatabaseCommand_LoadPlaylistEntries( revision_guid, parent )
|
||||||
{ qDebug() << "loaded with:" << revision_guid << guid(); }
|
{
|
||||||
|
// qDebug() << "loaded with:" << revision_guid << guid();
|
||||||
|
}
|
||||||
|
|
||||||
virtual void exec( DatabaseImpl* );
|
virtual void exec( DatabaseImpl* );
|
||||||
virtual bool doesMutates() const { return false; }
|
virtual bool doesMutates() const { return false; }
|
||||||
|
@@ -108,31 +108,31 @@ Servent::startListening( QHostAddress ha, bool upnp, int port )
|
|||||||
defPortAlso = listen( ha, defPort );
|
defPortAlso = listen( ha, defPort );
|
||||||
if( !defPortAlso )
|
if( !defPortAlso )
|
||||||
{
|
{
|
||||||
qDebug() << "Failed to listen on both port " << m_port << " and port " << defPort;
|
qDebug() << "Failed to listen on both port" << m_port << "and port" << defPort;
|
||||||
qDebug() << "Error string is " << errorString();
|
qDebug() << "Error string is" << errorString();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
qDebug() << "Servent listening on port " << defPort << " servent thread:" << thread();
|
qDebug() << "Servent listening on port" << defPort << "servent thread:" << thread();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bool defPortAlso = listen( ha, defPort );
|
bool defPortAlso = listen( ha, defPort );
|
||||||
qDebug() << "Servent listening on port " << m_port << " servent thread:" << thread();
|
qDebug() << "Servent listening on port" << m_port << "servent thread:" << thread();
|
||||||
if( defPortAlso )
|
if( defPortAlso )
|
||||||
qDebug() << "Servent also listening on port " << defPort << " servent thread:" << thread();
|
qDebug() << "Servent also listening on port" << defPort << "servent thread:" << thread();
|
||||||
}
|
}
|
||||||
|
|
||||||
// --lanhack means to advertise your LAN IP over jabber as if it were externallyVisible
|
// --lanhack means to advertise your LAN IP over jabber as if it were externallyVisible
|
||||||
qDebug() << "Address mode = " << (int)(TomahawkSettings::instance()->externalAddressMode());
|
qDebug() << "Address mode =" << (int)(TomahawkSettings::instance()->externalAddressMode());
|
||||||
qDebug() << "Static host/port preferred ? = " << ( TomahawkSettings::instance()->preferStaticHostPort() ? "true" : "false" );
|
qDebug() << "Static host/port preferred =" << ( TomahawkSettings::instance()->preferStaticHostPort() ? "true" : "false" );
|
||||||
|
|
||||||
if( TomahawkSettings::instance()->preferStaticHostPort() )
|
if( TomahawkSettings::instance()->preferStaticHostPort() )
|
||||||
{
|
{
|
||||||
qDebug() << "Forcing static preferred host and port";
|
qDebug() << "Forcing static preferred host and port";
|
||||||
m_externalHostname = TomahawkSettings::instance()->externalHostname();
|
m_externalHostname = TomahawkSettings::instance()->externalHostname();
|
||||||
m_externalPort = TomahawkSettings::instance()->externalPort();
|
m_externalPort = TomahawkSettings::instance()->externalPort();
|
||||||
qDebug() << m_externalHostname << m_externalPort;
|
// qDebug() << m_externalHostname << m_externalPort;
|
||||||
emit ready();
|
emit ready();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -176,7 +176,7 @@ Servent::startListening( QHostAddress ha, bool upnp, int port )
|
|||||||
QString
|
QString
|
||||||
Servent::createConnectionKey( const QString& name, const QString &nodeid, const QString &key, bool onceOnly )
|
Servent::createConnectionKey( const QString& name, const QString &nodeid, const QString &key, bool onceOnly )
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
// qDebug() << Q_FUNC_INFO;
|
||||||
Q_ASSERT( this->thread() == QThread::currentThread() );
|
Q_ASSERT( this->thread() == QThread::currentThread() );
|
||||||
|
|
||||||
QString _key = ( key.isEmpty() ? uuid() : key );
|
QString _key = ( key.isEmpty() ? uuid() : key );
|
||||||
@@ -226,7 +226,7 @@ Servent::registerOffer( const QString& key, Connection* conn )
|
|||||||
void
|
void
|
||||||
Servent::registerControlConnection( ControlConnection* conn )
|
Servent::registerControlConnection( ControlConnection* conn )
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO << conn->id();
|
// qDebug() << Q_FUNC_INFO << conn->id();
|
||||||
m_controlconnections.append( conn );
|
m_controlconnections.append( conn );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -274,7 +274,7 @@ Servent::incomingConnection( int sd )
|
|||||||
|
|
||||||
connect( sock, SIGNAL( readyRead() ), SLOT( readyRead() ), Qt::QueuedConnection );
|
connect( sock, SIGNAL( readyRead() ), SLOT( readyRead() ), Qt::QueuedConnection );
|
||||||
connect( sock, SIGNAL( disconnected() ), sock, SLOT( deleteLater() ), Qt::QueuedConnection );
|
connect( sock, SIGNAL( disconnected() ), sock, SLOT( deleteLater() ), Qt::QueuedConnection );
|
||||||
qDebug() << "connection accepted.";
|
// qDebug() << "connection accepted.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -324,13 +324,13 @@ Servent::readyRead()
|
|||||||
nodeid = m.value( "nodeid" ).toString();
|
nodeid = m.value( "nodeid" ).toString();
|
||||||
controlid = m.value( "controlid" ).toString();
|
controlid = m.value( "controlid" ).toString();
|
||||||
|
|
||||||
qDebug() << "Incoming connection details: " << m;
|
qDebug() << "Incoming connection details:" << m;
|
||||||
|
|
||||||
if( !nodeid.isEmpty() ) // only control connections send nodeid
|
if( !nodeid.isEmpty() ) // only control connections send nodeid
|
||||||
{
|
{
|
||||||
foreach( ControlConnection* con, m_controlconnections )
|
foreach( ControlConnection* con, m_controlconnections )
|
||||||
{
|
{
|
||||||
qDebug() << con->socket() << sock;
|
// qDebug() << con->socket() << sock;
|
||||||
if( con->id() == nodeid )
|
if( con->id() == nodeid )
|
||||||
{
|
{
|
||||||
qDebug() << "Duplicate control connection detected, dropping:" << nodeid << conntype;
|
qDebug() << "Duplicate control connection detected, dropping:" << nodeid << conntype;
|
||||||
@@ -420,7 +420,7 @@ Servent::socketConnected()
|
|||||||
{
|
{
|
||||||
QTcpSocketExtra* sock = (QTcpSocketExtra*)sender();
|
QTcpSocketExtra* sock = (QTcpSocketExtra*)sender();
|
||||||
|
|
||||||
qDebug() << "Servent::SocketConnected" << thread() << "socket:" << sock;
|
// qDebug() << "Servent::SocketConnected" << thread() << "socket:" << sock;
|
||||||
|
|
||||||
Connection* conn = sock->_conn;
|
Connection* conn = sock->_conn;
|
||||||
handoverSocket( conn, sock );
|
handoverSocket( conn, sock );
|
||||||
@@ -565,7 +565,7 @@ Servent::reverseOfferRequest( ControlConnection* orig_conn, const QString &their
|
|||||||
Connection*
|
Connection*
|
||||||
Servent::claimOffer( ControlConnection* cc, const QString &nodeid, const QString &key, const QHostAddress peer )
|
Servent::claimOffer( ControlConnection* cc, const QString &nodeid, const QString &key, const QHostAddress peer )
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
// qDebug() << Q_FUNC_INFO;
|
||||||
|
|
||||||
bool noauth = qApp->arguments().contains( "--noauth" );
|
bool noauth = qApp->arguments().contains( "--noauth" );
|
||||||
|
|
||||||
@@ -722,7 +722,7 @@ Servent::checkACL( const Connection* conn, const QString &nodeid, bool showDialo
|
|||||||
QSharedPointer<QIODevice>
|
QSharedPointer<QIODevice>
|
||||||
Servent::remoteIODeviceFactory( const result_ptr& result )
|
Servent::remoteIODeviceFactory( const result_ptr& result )
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO << thread();
|
// qDebug() << Q_FUNC_INFO << thread();
|
||||||
QSharedPointer<QIODevice> sp;
|
QSharedPointer<QIODevice> sp;
|
||||||
|
|
||||||
QStringList parts = result->url().mid( QString( "servent://" ).length() ).split( "\t" );
|
QStringList parts = result->url().mid( QString( "servent://" ).length() ).split( "\t" );
|
||||||
@@ -809,10 +809,10 @@ bool
|
|||||||
Servent::connectedToSession( const QString& session )
|
Servent::connectedToSession( const QString& session )
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
qDebug() << Q_FUNC_INFO;
|
||||||
qDebug() << "Checking against" << session;
|
// qDebug() << "Checking against" << session;
|
||||||
foreach( ControlConnection* cc, m_controlconnections )
|
foreach( ControlConnection* cc, m_controlconnections )
|
||||||
{
|
{
|
||||||
qDebug() << "Checking session" << cc->id();
|
// qDebug() << "Checking session" << cc->id();
|
||||||
if( cc->id() == session )
|
if( cc->id() == session )
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -56,7 +56,7 @@ DynamicPlaylist::DynamicPlaylist ( const Tomahawk::source_ptr& src,
|
|||||||
const QString& guid )
|
const QString& guid )
|
||||||
: Playlist( src, currentrevision, title, info, creator, createdOn, shared, lastmod, guid )
|
: Playlist( src, currentrevision, title, info, creator, createdOn, shared, lastmod, guid )
|
||||||
{
|
{
|
||||||
qDebug() << "Creating Dynamic Playlist 1";
|
// qDebug() << "Creating Dynamic Playlist 1";
|
||||||
// TODO instantiate generator
|
// TODO instantiate generator
|
||||||
m_generator = geninterface_ptr( GeneratorFactory::create( type ) );
|
m_generator = geninterface_ptr( GeneratorFactory::create( type ) );
|
||||||
m_generator->setMode( mode );
|
m_generator->setMode( mode );
|
||||||
@@ -74,7 +74,7 @@ DynamicPlaylist::DynamicPlaylist ( const Tomahawk::source_ptr& author,
|
|||||||
bool shared )
|
bool shared )
|
||||||
: Playlist ( author, guid, title, info, creator, shared )
|
: Playlist ( author, guid, title, info, creator, shared )
|
||||||
{
|
{
|
||||||
qDebug() << "Creating Dynamic Playlist 2";
|
// qDebug() << "Creating Dynamic Playlist 2";
|
||||||
m_generator = geninterface_ptr( GeneratorFactory::create( type ) );
|
m_generator = geninterface_ptr( GeneratorFactory::create( type ) );
|
||||||
m_generator->setMode( mode );
|
m_generator->setMode( mode );
|
||||||
}
|
}
|
||||||
@@ -208,7 +208,7 @@ DynamicPlaylist::createNewRevision( const QString& newrev,
|
|||||||
void
|
void
|
||||||
DynamicPlaylist::loadRevision( const QString& rev )
|
DynamicPlaylist::loadRevision( const QString& rev )
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO << "Loading with:" << ( rev.isEmpty() ? currentrevision() : rev );
|
// qDebug() << Q_FUNC_INFO << "Loading with:" << ( rev.isEmpty() ? currentrevision() : rev );
|
||||||
|
|
||||||
setBusy( true );
|
setBusy( true );
|
||||||
DatabaseCommand_LoadDynamicPlaylist* cmd = new DatabaseCommand_LoadDynamicPlaylist( rev.isEmpty() ? currentrevision() : rev );
|
DatabaseCommand_LoadDynamicPlaylist* cmd = new DatabaseCommand_LoadDynamicPlaylist( rev.isEmpty() ? currentrevision() : rev );
|
||||||
@@ -258,7 +258,7 @@ DynamicPlaylist::remove( const Tomahawk::dynplaylist_ptr& playlist )
|
|||||||
void
|
void
|
||||||
DynamicPlaylist::reportCreated( const Tomahawk::dynplaylist_ptr& self )
|
DynamicPlaylist::reportCreated( const Tomahawk::dynplaylist_ptr& self )
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
// qDebug() << Q_FUNC_INFO;
|
||||||
Q_ASSERT( self.data() == this );
|
Q_ASSERT( self.data() == this );
|
||||||
Q_ASSERT( !author().isNull() );
|
Q_ASSERT( !author().isNull() );
|
||||||
Q_ASSERT( !author()->collection().isNull() );
|
Q_ASSERT( !author()->collection().isNull() );
|
||||||
@@ -274,7 +274,7 @@ DynamicPlaylist::reportCreated( const Tomahawk::dynplaylist_ptr& self )
|
|||||||
void
|
void
|
||||||
DynamicPlaylist::reportDeleted( const Tomahawk::dynplaylist_ptr& self )
|
DynamicPlaylist::reportDeleted( const Tomahawk::dynplaylist_ptr& self )
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
// qDebug() << Q_FUNC_INFO;
|
||||||
Q_ASSERT( self.data() == this );
|
Q_ASSERT( self.data() == this );
|
||||||
// will emit Collection::playlistDeleted(...)
|
// will emit Collection::playlistDeleted(...)
|
||||||
if( self->mode() == Static )
|
if( self->mode() == Static )
|
||||||
|
@@ -66,7 +66,7 @@ Tomahawk::EchonestControl::setSelectedType ( const QString& type )
|
|||||||
Tomahawk::DynamicControl::setSelectedType ( type );
|
Tomahawk::DynamicControl::setSelectedType ( type );
|
||||||
updateWidgets();
|
updateWidgets();
|
||||||
updateData();
|
updateData();
|
||||||
qDebug() << "Setting new type, set data to:" << m_data.first << m_data.second;
|
// qDebug() << "Setting new type, set data to:" << m_data.first << m_data.second;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -494,7 +494,7 @@ void Tomahawk::EchonestControl::updateToLabelAndCombo()
|
|||||||
void
|
void
|
||||||
Tomahawk::EchonestControl::editingFinished()
|
Tomahawk::EchonestControl::editingFinished()
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
// qDebug() << Q_FUNC_INFO;
|
||||||
m_editingTimer.start();
|
m_editingTimer.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -55,7 +55,7 @@ EchonestGenerator::EchonestGenerator ( QObject* parent )
|
|||||||
m_type = "echonest";
|
m_type = "echonest";
|
||||||
m_mode = OnDemand;
|
m_mode = OnDemand;
|
||||||
m_logo.load( RESPATH "/images/echonest_logo.png" );
|
m_logo.load( RESPATH "/images/echonest_logo.png" );
|
||||||
qDebug() << "ECHONEST:" << m_logo.size();
|
// qDebug() << "ECHONEST:" << m_logo.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
EchonestGenerator::~EchonestGenerator()
|
EchonestGenerator::~EchonestGenerator()
|
||||||
@@ -77,11 +77,11 @@ QPixmap EchonestGenerator::logo()
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
EchonestGenerator::generate ( int number )
|
EchonestGenerator::generate( int number )
|
||||||
{
|
{
|
||||||
// convert to an echonest query, and fire it off
|
// convert to an echonest query, and fire it off
|
||||||
qDebug() << Q_FUNC_INFO;
|
qDebug() << Q_FUNC_INFO;
|
||||||
qDebug() << "Generating playlist with " << m_controls.size();
|
qDebug() << "Generating playlist with" << m_controls.size();
|
||||||
foreach( const dyncontrol_ptr& ctrl, m_controls )
|
foreach( const dyncontrol_ptr& ctrl, m_controls )
|
||||||
qDebug() << ctrl->selectedType() << ctrl->match() << ctrl->input();
|
qDebug() << ctrl->selectedType() << ctrl->match() << ctrl->input();
|
||||||
|
|
||||||
@@ -147,7 +147,7 @@ EchonestGenerator::staticFinished()
|
|||||||
try {
|
try {
|
||||||
songs = Echonest::DynamicPlaylist::parseStaticPlaylist( reply );
|
songs = Echonest::DynamicPlaylist::parseStaticPlaylist( reply );
|
||||||
} catch( const Echonest::ParseError& e ) {
|
} catch( const Echonest::ParseError& e ) {
|
||||||
qWarning() << "libechonest threw an error trying to parse the static playlist! code" << e.errorType() << "error desc:" << e.what();
|
qWarning() << "libechonest threw an error trying to parse the static playlist code" << e.errorType() << "error desc:" << e.what();
|
||||||
|
|
||||||
emit error( "The Echo Nest returned an error creating the playlist", e.what() );
|
emit error( "The Echo Nest returned an error creating the playlist", e.what() );
|
||||||
return;
|
return;
|
||||||
|
@@ -373,7 +373,7 @@ setProxy( QNetworkProxy* proxy )
|
|||||||
{
|
{
|
||||||
s_proxy = proxy;
|
s_proxy = proxy;
|
||||||
s_nam.data()->setProxy( *proxy );
|
s_nam.data()->setProxy( *proxy );
|
||||||
qDebug() << Q_FUNC_INFO << " setting proxy to use proxy DNS? " << (TomahawkSettings::instance()->proxyDns() ? "true" : "false");
|
qDebug() << Q_FUNC_INFO << "setting proxy to use proxy DNS?" << (TomahawkSettings::instance()->proxyDns() ? "true" : "false");
|
||||||
if ( !TomahawkSettings::instance()->proxyDns() )
|
if ( !TomahawkSettings::instance()->proxyDns() )
|
||||||
s_proxy->setCapabilities( QNetworkProxy::TunnelingCapability | QNetworkProxy::ListeningCapability | QNetworkProxy::UdpTunnelingCapability );
|
s_proxy->setCapabilities( QNetworkProxy::TunnelingCapability | QNetworkProxy::ListeningCapability | QNetworkProxy::UdpTunnelingCapability );
|
||||||
}
|
}
|
||||||
@@ -410,8 +410,7 @@ DNSResolver::resolve( QString &host, QString type )
|
|||||||
// For the moment, assume we are looking for XMPP...
|
// For the moment, assume we are looking for XMPP...
|
||||||
QString fullHost( "_xmpp-client._tcp." + host );
|
QString fullHost( "_xmpp-client._tcp." + host );
|
||||||
|
|
||||||
qDebug() << "Looking up SRV record for " << fullHost.toUtf8();
|
qDebug() << "Looking up SRV record for" << fullHost.toUtf8();
|
||||||
|
|
||||||
m_dnsSharedRequest->query( fullHost.toUtf8(), QJDns::Srv );
|
m_dnsSharedRequest->query( fullHost.toUtf8(), QJDns::Srv );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -429,7 +428,7 @@ DNSResolver::resultsReady()
|
|||||||
QList<QJDns::Record> results = m_dnsSharedRequest->results();
|
QList<QJDns::Record> results = m_dnsSharedRequest->results();
|
||||||
foreach( QJDns::Record r, results )
|
foreach( QJDns::Record r, results )
|
||||||
{
|
{
|
||||||
qDebug() << "Found result (of some type): " << QString( r.name );
|
qDebug() << "Found result (of some type):" << QString( r.name );
|
||||||
if( r.type == QJDns::Srv )
|
if( r.type == QJDns::Srv )
|
||||||
{
|
{
|
||||||
QString foundResult( r.name );
|
QString foundResult( r.name );
|
||||||
@@ -438,7 +437,7 @@ DNSResolver::resultsReady()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
qDebug() << "DNS resolve request was NOT successful! Error: " << (int)(m_dnsSharedRequest->error());
|
qDebug() << "DNS resolve request was NOT successful! Error:" << (int)(m_dnsSharedRequest->error());
|
||||||
QString badResult( "NONE" );
|
QString badResult( "NONE" );
|
||||||
emit result( badResult );
|
emit result( badResult );
|
||||||
}
|
}
|
||||||
|
@@ -178,7 +178,7 @@ CollectionItem::playlistsDeletedInternal( SourceTreeItem* parent, const QList< T
|
|||||||
void
|
void
|
||||||
CollectionItem::onPlaylistsAdded( const QList< playlist_ptr >& playlists )
|
CollectionItem::onPlaylistsAdded( const QList< playlist_ptr >& playlists )
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO << m_source->friendlyName() << playlists.count();
|
// qDebug() << Q_FUNC_INFO << m_source->friendlyName() << playlists.count();
|
||||||
|
|
||||||
if( playlists.isEmpty() )
|
if( playlists.isEmpty() )
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user