1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-14 10:05:32 +02:00

* Now supports scrobbling in headless mode, too.

This commit is contained in:
Christian Muehlhaeuser
2010-11-14 06:24:51 +01:00
parent 09351e6356
commit c63d9caf85
2 changed files with 13 additions and 12 deletions

View File

@@ -115,9 +115,10 @@ TomahawkApp::TomahawkApp( int& argc, char *argv[] )
m_mainwindow = 0;
m_headless = arguments().contains( "--headless" );
setWindowIcon( QIcon( RESPATH "icons/tomahawk-icon-128x128.png" ) );
#endif
#ifndef NO_LIBLASTFM
m_scrobbler = 0;
#endif
#endif
qDebug() << "TomahawkApp thread:" << this->thread();
@@ -132,10 +133,6 @@ TomahawkApp::TomahawkApp( int& argc, char *argv[] )
m_audioEngine = new AudioEngine;
setupDatabase();
#ifndef TOMAHAWK_HEADLESS
if ( !m_headless )
{
#ifndef NO_LIBLASTFM
m_scrobbler = new Scrobbler( this );
m_nam = new lastfm::NetworkAccessManager( this );
@@ -155,6 +152,10 @@ TomahawkApp::TomahawkApp( int& argc, char *argv[] )
m_nam = new QNetworkAccessManager;
#endif
#ifndef TOMAHAWK_HEADLESS
if ( !m_headless )
{
m_mainwindow = new TomahawkWindow();
m_mainwindow->show();
connect( m_mainwindow, SIGNAL( settingsChanged() ), SIGNAL( settingsChanged() ) );