mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 19:30:21 +02:00
* Now supports scrobbling in headless mode, too.
This commit is contained in:
@@ -42,16 +42,15 @@ namespace Tomahawk
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef TOMAHAWK_HEADLESS
|
||||
class TomahawkWindow;
|
||||
class PlaylistManager;
|
||||
#include <QStackedWidget>
|
||||
|
||||
#ifndef NO_LIBLASTFM
|
||||
#include <lastfm/NetworkAccessManager>
|
||||
#include "scrobbler.h"
|
||||
#endif
|
||||
|
||||
#ifndef TOMAHAWK_HEADLESS
|
||||
class TomahawkWindow;
|
||||
class PlaylistManager;
|
||||
#include <QStackedWidget>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -130,11 +129,12 @@ private:
|
||||
QSharedPointer<Jabber> m_jabber;
|
||||
XMPPBot* m_xmppBot;
|
||||
|
||||
#ifndef TOMAHAWK_HEADLESS
|
||||
TomahawkWindow* m_mainwindow;
|
||||
#ifndef NO_LIBLASTFM
|
||||
Scrobbler* m_scrobbler;
|
||||
#endif
|
||||
|
||||
#ifndef TOMAHAWK_HEADLESS
|
||||
TomahawkWindow* m_mainwindow;
|
||||
#endif
|
||||
|
||||
QMap< QString,boost::function<QSharedPointer<QIODevice>(Tomahawk::result_ptr)> > m_iofactories;
|
||||
|
@@ -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() ) );
|
||||
|
Reference in New Issue
Block a user