mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-12 09:04:33 +02:00
* Some more scanner fixes.
* Update collections without having to restart the app. * Rescan collection is now more like "update collection", doesn't ask for a path anymore. * Scrobbler picks up setting changes correctly again.
This commit is contained in:
@@ -75,9 +75,6 @@ public:
|
|||||||
virtual void activate();
|
virtual void activate();
|
||||||
virtual bool loadUrl( const QString& url );
|
virtual bool loadUrl( const QString& url );
|
||||||
|
|
||||||
signals:
|
|
||||||
void settingsChanged();
|
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void setupSIP();
|
void setupSIP();
|
||||||
void messageReceived( const QString& );
|
void messageReceived( const QString& );
|
||||||
|
@@ -31,12 +31,14 @@ Collection::name() const
|
|||||||
return m_name;
|
return m_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const
|
const
|
||||||
source_ptr& Collection::source() const
|
source_ptr& Collection::source() const
|
||||||
{
|
{
|
||||||
return m_source;
|
return m_source;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Collection::addPlaylist( const Tomahawk::playlist_ptr& p )
|
Collection::addPlaylist( const Tomahawk::playlist_ptr& p )
|
||||||
{
|
{
|
||||||
@@ -51,6 +53,7 @@ Collection::addPlaylist( const Tomahawk::playlist_ptr& p )
|
|||||||
emit playlistsAdded( toadd );
|
emit playlistsAdded( toadd );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Collection::addDynamicPlaylist( const Tomahawk::dynplaylist_ptr& p )
|
Collection::addDynamicPlaylist( const Tomahawk::dynplaylist_ptr& p )
|
||||||
{
|
{
|
||||||
@@ -80,6 +83,7 @@ Collection::deletePlaylist( const Tomahawk::playlist_ptr& p )
|
|||||||
emit playlistsDeleted( todelete );
|
emit playlistsDeleted( todelete );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Collection::deleteDynamicPlaylist( const Tomahawk::dynplaylist_ptr& p )
|
Collection::deleteDynamicPlaylist( const Tomahawk::dynplaylist_ptr& p )
|
||||||
{
|
{
|
||||||
@@ -137,6 +141,7 @@ Collection::setPlaylists( const QList<Tomahawk::playlist_ptr>& plists )
|
|||||||
emit playlistsAdded( plists );
|
emit playlistsAdded( plists );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Collection::setDynamicPlaylists( const QList< Tomahawk::dynplaylist_ptr >& plists )
|
Collection::setDynamicPlaylists( const QList< Tomahawk::dynplaylist_ptr >& plists )
|
||||||
{
|
{
|
||||||
@@ -146,6 +151,7 @@ Collection::setDynamicPlaylists( const QList< Tomahawk::dynplaylist_ptr >& plist
|
|||||||
emit dynamicPlaylistsAdded( plists );
|
emit dynamicPlaylistsAdded( plists );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Collection::setTracks( const QList<Tomahawk::query_ptr>& tracks, Tomahawk::collection_ptr collection )
|
Collection::setTracks( const QList<Tomahawk::query_ptr>& tracks, Tomahawk::collection_ptr collection )
|
||||||
{
|
{
|
||||||
|
@@ -72,6 +72,7 @@ public slots:
|
|||||||
void setPlaylists( const QList<Tomahawk::playlist_ptr>& plists );
|
void setPlaylists( const QList<Tomahawk::playlist_ptr>& plists );
|
||||||
void setDynamicPlaylists( const QList< Tomahawk::dynplaylist_ptr >& dynplists );
|
void setDynamicPlaylists( const QList< Tomahawk::dynplaylist_ptr >& dynplists );
|
||||||
void setTracks( const QList<Tomahawk::query_ptr>& tracks, Tomahawk::collection_ptr collection );
|
void setTracks( const QList<Tomahawk::query_ptr>& tracks, Tomahawk::collection_ptr collection );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QString m_name;
|
QString m_name;
|
||||||
unsigned int m_lastmodified; // unix time of last change to collection
|
unsigned int m_lastmodified; // unix time of last change to collection
|
||||||
|
@@ -27,6 +27,7 @@ DatabaseCollection::loadPlaylists()
|
|||||||
Database::instance()->enqueue( QSharedPointer<DatabaseCommand>( cmd ) );
|
Database::instance()->enqueue( QSharedPointer<DatabaseCommand>( cmd ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
DatabaseCollection::loadDynamicPlaylists()
|
DatabaseCollection::loadDynamicPlaylists()
|
||||||
{
|
{
|
||||||
@@ -34,23 +35,20 @@ DatabaseCollection::loadDynamicPlaylists()
|
|||||||
DatabaseCommand_LoadAllDynamicPlaylists* cmd = new DatabaseCommand_LoadAllDynamicPlaylists( source() );
|
DatabaseCommand_LoadAllDynamicPlaylists* cmd = new DatabaseCommand_LoadAllDynamicPlaylists( source() );
|
||||||
|
|
||||||
connect( cmd, SIGNAL( playlistLoaded( Tomahawk::source_ptr, QVariantList ) ),
|
connect( cmd, SIGNAL( playlistLoaded( Tomahawk::source_ptr, QVariantList ) ),
|
||||||
this, SLOT( dynamicPlaylistCreated( const Tomahawk::source_ptr&, const QVariantList& ) ) );
|
SLOT( dynamicPlaylistCreated( const Tomahawk::source_ptr&, const QVariantList& ) ) );
|
||||||
|
|
||||||
Database::instance()->enqueue( QSharedPointer<DatabaseCommand>( cmd ) );
|
Database::instance()->enqueue( QSharedPointer<DatabaseCommand>( cmd ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
DatabaseCollection::loadTracks()
|
DatabaseCollection::loadTracks()
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO << source()->userName();
|
qDebug() << Q_FUNC_INFO << source()->userName();
|
||||||
DatabaseCommand_AllTracks* cmd = new DatabaseCommand_AllTracks( source()->collection() );
|
DatabaseCommand_AllTracks* cmd = new DatabaseCommand_AllTracks( source()->collection() );
|
||||||
|
|
||||||
connect( cmd, SIGNAL( tracks( QList<Tomahawk::query_ptr>, Tomahawk::collection_ptr ) ),
|
connect( cmd, SIGNAL( tracks( QList<Tomahawk::query_ptr>, Tomahawk::collection_ptr ) ),
|
||||||
SLOT( setTracks( QList<Tomahawk::query_ptr>, Tomahawk::collection_ptr ) ) );
|
SLOT( setTracks( QList<Tomahawk::query_ptr>, Tomahawk::collection_ptr ) ) );
|
||||||
/* connect( cmd, SIGNAL( done( Tomahawk::collection_ptr ) ),
|
|
||||||
SIGNAL( tracksFinished( Tomahawk::collection_ptr ) ) );*/
|
|
||||||
|
|
||||||
Database::instance()->enqueue( QSharedPointer<DatabaseCommand>( cmd ) );
|
Database::instance()->enqueue( QSharedPointer<DatabaseCommand>( cmd ) );
|
||||||
}
|
}
|
||||||
@@ -90,6 +88,7 @@ DatabaseCollection::playlists()
|
|||||||
return Collection::playlists();
|
return Collection::playlists();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QList< dynplaylist_ptr > DatabaseCollection::dynamicPlaylists()
|
QList< dynplaylist_ptr > DatabaseCollection::dynamicPlaylists()
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
qDebug() << Q_FUNC_INFO;
|
||||||
@@ -103,7 +102,6 @@ QList< dynplaylist_ptr > DatabaseCollection::dynamicPlaylists()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
QList< Tomahawk::query_ptr >
|
QList< Tomahawk::query_ptr >
|
||||||
DatabaseCollection::tracks()
|
DatabaseCollection::tracks()
|
||||||
{
|
{
|
||||||
@@ -117,6 +115,7 @@ DatabaseCollection::tracks()
|
|||||||
return Collection::tracks();
|
return Collection::tracks();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DatabaseCollection::dynamicPlaylistCreated( const source_ptr& source, const QVariantList& data )
|
void DatabaseCollection::dynamicPlaylistCreated( const source_ptr& source, const QVariantList& data )
|
||||||
{
|
{
|
||||||
dynplaylist_ptr p( new DynamicPlaylist( source, //src
|
dynplaylist_ptr p( new DynamicPlaylist( source, //src
|
||||||
|
@@ -38,11 +38,11 @@ DatabaseCommand_AddFiles::postCommitHook()
|
|||||||
// collection browser will update/fade in etc.
|
// collection browser will update/fade in etc.
|
||||||
Collection* coll = source()->collection().data();
|
Collection* coll = source()->collection().data();
|
||||||
|
|
||||||
connect( this, SIGNAL( notify( QList<QVariant>, Tomahawk::collection_ptr ) ),
|
connect( this, SIGNAL( notify( QList<Tomahawk::query_ptr>, Tomahawk::collection_ptr ) ),
|
||||||
coll, SIGNAL( setTracks( QList<QVariant>, Tomahawk::collection_ptr ) ),
|
coll, SLOT( setTracks( QList<Tomahawk::query_ptr>, Tomahawk::collection_ptr ) ),
|
||||||
Qt::QueuedConnection );
|
Qt::QueuedConnection );
|
||||||
// do it like this so it gets called in the right thread:
|
|
||||||
emit notify( m_files, source()->collection() );
|
emit notify( m_queries, source()->collection() );
|
||||||
|
|
||||||
// also re-calc the collection stats, to updates the "X tracks" in the sidebar etc:
|
// also re-calc the collection stats, to updates the "X tracks" in the sidebar etc:
|
||||||
DatabaseCommand_CollectionStats* cmd = new DatabaseCommand_CollectionStats( source() );
|
DatabaseCommand_CollectionStats* cmd = new DatabaseCommand_CollectionStats( source() );
|
||||||
@@ -68,7 +68,7 @@ DatabaseCommand_AddFiles::exec( DatabaseImpl* dbi )
|
|||||||
|
|
||||||
query_file.prepare( "INSERT INTO file(source, url, size, mtime, md5, mimetype, duration, bitrate) "
|
query_file.prepare( "INSERT INTO file(source, url, size, mtime, md5, mimetype, duration, bitrate) "
|
||||||
"VALUES (?, ?, ?, ?, ?, ?, ?, ?)" );
|
"VALUES (?, ?, ?, ?, ?, ?, ?, ?)" );
|
||||||
query_filejoin.prepare( "INSERT INTO file_join(file, artist ,album, track, albumpos) "
|
query_filejoin.prepare( "INSERT INTO file_join(file, artist, album, track, albumpos) "
|
||||||
"VALUES (?,?,?,?,?)" );
|
"VALUES (?,?,?,?,?)" );
|
||||||
query_trackattr.prepare( "INSERT INTO track_attributes(id, k, v) "
|
query_trackattr.prepare( "INSERT INTO track_attributes(id, k, v) "
|
||||||
"VALUES (?,?,?)" );
|
"VALUES (?,?,?)" );
|
||||||
@@ -88,7 +88,7 @@ DatabaseCommand_AddFiles::exec( DatabaseImpl* dbi )
|
|||||||
QVariantMap m = v.toMap();
|
QVariantMap m = v.toMap();
|
||||||
|
|
||||||
QString url = m.value( "url" ).toString();
|
QString url = m.value( "url" ).toString();
|
||||||
int mtime = m.value( "lastmodified" ).toInt();
|
int mtime = m.value( "mtime" ).toInt();
|
||||||
int size = m.value( "size" ).toInt();
|
int size = m.value( "size" ).toInt();
|
||||||
QString hash = m.value( "hash" ).toString();
|
QString hash = m.value( "hash" ).toString();
|
||||||
QString mimetype = m.value( "mimetype" ).toString();
|
QString mimetype = m.value( "mimetype" ).toString();
|
||||||
@@ -137,19 +137,19 @@ DatabaseCommand_AddFiles::exec( DatabaseImpl* dbi )
|
|||||||
v = m;
|
v = m;
|
||||||
|
|
||||||
bool isnew;
|
bool isnew;
|
||||||
int artid = dbi->artistId( artist, isnew );
|
m["artistid"] = dbi->artistId( artist, isnew );
|
||||||
if( artid < 1 ) continue;
|
if( m["artistid"].toInt() < 1 ) continue;
|
||||||
|
|
||||||
int trkid = dbi->trackId( artid, track, isnew );
|
m["trackid"] = dbi->trackId( m["artistid"].toInt(), track, isnew );
|
||||||
if( trkid < 1 ) continue;
|
if( m["trackid"].toInt() < 1 ) continue;
|
||||||
|
|
||||||
int albid = dbi->albumId( artid, album, isnew );
|
m["albumid"] = dbi->albumId( m["artistid"].toInt(), album, isnew );
|
||||||
|
|
||||||
// Now add the association
|
// Now add the association
|
||||||
query_filejoin.bindValue( 0, fileid );
|
query_filejoin.bindValue( 0, fileid );
|
||||||
query_filejoin.bindValue( 1, artid );
|
query_filejoin.bindValue( 1, m["artistid"].toInt() );
|
||||||
query_filejoin.bindValue( 2, albid > 0 ? albid : QVariant( QVariant::Int ) );
|
query_filejoin.bindValue( 2, m["albumid"].toInt() > 0 ? m["albumid"].toInt() : QVariant( QVariant::Int ) );
|
||||||
query_filejoin.bindValue( 3, trkid );
|
query_filejoin.bindValue( 3, m["trackid"].toInt() );
|
||||||
query_filejoin.bindValue( 4, albumpos );
|
query_filejoin.bindValue( 4, albumpos );
|
||||||
if( !query_filejoin.exec() )
|
if( !query_filejoin.exec() )
|
||||||
{
|
{
|
||||||
@@ -157,11 +157,25 @@ DatabaseCommand_AddFiles::exec( DatabaseImpl* dbi )
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
query_trackattr.bindValue( 0, trkid );
|
query_trackattr.bindValue( 0, m["trackid"].toInt() );
|
||||||
query_trackattr.bindValue( 1, "releaseyear" );
|
query_trackattr.bindValue( 1, "releaseyear" );
|
||||||
query_trackattr.bindValue( 2, year );
|
query_trackattr.bindValue( 2, year );
|
||||||
query_trackattr.exec();
|
query_trackattr.exec();
|
||||||
|
|
||||||
|
QVariantMap attr;
|
||||||
|
Tomahawk::query_ptr query = Tomahawk::Query::get( m, false );
|
||||||
|
m["score"] = 1.0;
|
||||||
|
attr["releaseyear"] = m.value( "year" );
|
||||||
|
|
||||||
|
Tomahawk::result_ptr result = Tomahawk::result_ptr( new Tomahawk::Result( m, source()->collection() ) );
|
||||||
|
result->setAttributes( attr );
|
||||||
|
|
||||||
|
QList<Tomahawk::result_ptr> results;
|
||||||
|
results << result;
|
||||||
|
query->addResults( results );
|
||||||
|
|
||||||
|
m_queries << query;
|
||||||
|
|
||||||
added++;
|
added++;
|
||||||
}
|
}
|
||||||
qDebug() << "Inserted" << added;
|
qDebug() << "Inserted" << added;
|
||||||
|
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#include "database/databasecommandloggable.h"
|
#include "database/databasecommandloggable.h"
|
||||||
#include "typedefs.h"
|
#include "typedefs.h"
|
||||||
|
#include "query.h"
|
||||||
|
|
||||||
#include "dllmacro.h"
|
#include "dllmacro.h"
|
||||||
|
|
||||||
@@ -36,10 +37,11 @@ public:
|
|||||||
|
|
||||||
signals:
|
signals:
|
||||||
void done( const QList<QVariant>&, Tomahawk::collection_ptr );
|
void done( const QList<QVariant>&, Tomahawk::collection_ptr );
|
||||||
void notify( const QList<QVariant>&, Tomahawk::collection_ptr );
|
void notify( const QList<Tomahawk::query_ptr>&, Tomahawk::collection_ptr );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QVariantList m_files;
|
QVariantList m_files;
|
||||||
|
QList<Tomahawk::query_ptr> m_queries;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DATABASECOMMAND_ADDFILES_H
|
#endif // DATABASECOMMAND_ADDFILES_H
|
||||||
|
@@ -51,8 +51,8 @@ DatabaseCommand_LogPlayback::exec( DatabaseImpl* dbi )
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
TomahawkSqlQuery query = dbi->newquery();
|
TomahawkSqlQuery query = dbi->newquery();
|
||||||
query.prepare( "INSERT INTO playback_log(source,track,playtime,secs_played) "
|
query.prepare( "INSERT INTO playback_log(source, track, playtime, secs_played) "
|
||||||
"VALUES (?, ?, ?, ?)" );
|
"VALUES (?, ?, ?, ?)" );
|
||||||
|
|
||||||
QVariant srcid = source()->isLocal() ? QVariant( QVariant::Int ) : source()->id();
|
QVariant srcid = source()->isLocal() ? QVariant( QVariant::Int ) : source()->id();
|
||||||
|
|
||||||
|
@@ -184,7 +184,7 @@ CollectionFlatModel::onTracksAdded( const QList<Tomahawk::query_ptr>& tracks, co
|
|||||||
emit endInsertRows();
|
emit endInsertRows();
|
||||||
|
|
||||||
emit trackCountChanged( rowCount( QModelIndex() ) );
|
emit trackCountChanged( rowCount( QModelIndex() ) );
|
||||||
qDebug() << rowCount( QModelIndex() );
|
qDebug() << Q_FUNC_INFO << rowCount( QModelIndex() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -42,9 +42,9 @@ MusicScanner::startScan()
|
|||||||
// trigger the scan once we've loaded old mtimes for dirs below our path
|
// trigger the scan once we've loaded old mtimes for dirs below our path
|
||||||
DatabaseCommand_DirMtimes* cmd = new DatabaseCommand_DirMtimes( m_dir );
|
DatabaseCommand_DirMtimes* cmd = new DatabaseCommand_DirMtimes( m_dir );
|
||||||
connect( cmd, SIGNAL( done( const QMap<QString, unsigned int>& ) ),
|
connect( cmd, SIGNAL( done( const QMap<QString, unsigned int>& ) ),
|
||||||
SLOT( setMtimes( const QMap<QString, unsigned int>& ) ), Qt::DirectConnection );
|
SLOT( setMtimes( const QMap<QString, unsigned int>& ) ) );
|
||||||
connect( cmd, SIGNAL( done( const QMap<QString,unsigned int>& ) ),
|
connect( cmd, SIGNAL( done( const QMap<QString,unsigned int>& ) ),
|
||||||
SLOT( scan() ), Qt::DirectConnection );
|
SLOT( scan() ) );
|
||||||
|
|
||||||
Database::instance()->enqueue( QSharedPointer<DatabaseCommand>(cmd) );
|
Database::instance()->enqueue( QSharedPointer<DatabaseCommand>(cmd) );
|
||||||
}
|
}
|
||||||
@@ -97,7 +97,7 @@ MusicScanner::listerFinished( const QMap<QString, unsigned int>& newmtimes )
|
|||||||
|
|
||||||
// save mtimes, then quit thread
|
// save mtimes, then quit thread
|
||||||
DatabaseCommand_DirMtimes* cmd = new DatabaseCommand_DirMtimes( newmtimes );
|
DatabaseCommand_DirMtimes* cmd = new DatabaseCommand_DirMtimes( newmtimes );
|
||||||
connect( cmd, SIGNAL( finished() ), SLOT( quit() ) );
|
connect( cmd, SIGNAL( finished() ), SLOT( deleteLater() ) );
|
||||||
Database::instance()->enqueue( QSharedPointer<DatabaseCommand>(cmd) );
|
Database::instance()->enqueue( QSharedPointer<DatabaseCommand>(cmd) );
|
||||||
|
|
||||||
qDebug() << "Scanning complete, saving to database. "
|
qDebug() << "Scanning complete, saving to database. "
|
||||||
@@ -108,7 +108,6 @@ MusicScanner::listerFinished( const QMap<QString, unsigned int>& newmtimes )
|
|||||||
qDebug() << s;
|
qDebug() << s;
|
||||||
|
|
||||||
m_dirLister->deleteLater();
|
m_dirLister->deleteLater();
|
||||||
deleteLater();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -212,7 +211,7 @@ MusicScanner::readFile( const QFileInfo& fi )
|
|||||||
|
|
||||||
QVariantMap m;
|
QVariantMap m;
|
||||||
m["url"] = url.arg( fi.absoluteFilePath() );
|
m["url"] = url.arg( fi.absoluteFilePath() );
|
||||||
m["lastmodified"] = fi.lastModified().toUTC().toTime_t();
|
m["mtime"] = fi.lastModified().toUTC().toTime_t();
|
||||||
m["size"] = (unsigned int)fi.size();
|
m["size"] = (unsigned int)fi.size();
|
||||||
m["hash"] = ""; // TODO
|
m["hash"] = ""; // TODO
|
||||||
m["mimetype"] = mimetype;
|
m["mimetype"] = mimetype;
|
||||||
|
@@ -57,8 +57,8 @@ Scrobbler::Scrobbler( QObject* parent )
|
|||||||
ldir.mkpath( lpath );
|
ldir.mkpath( lpath );
|
||||||
}
|
}
|
||||||
|
|
||||||
connect( TomahawkApp::instance(), SIGNAL( settingsChanged() ),
|
connect( TomahawkSettings::instance(), SIGNAL( settingsChanged() ),
|
||||||
SLOT( settingsChanged() ), Qt::QueuedConnection );
|
SLOT( settingsChanged() ), Qt::QueuedConnection );
|
||||||
|
|
||||||
connect( AudioEngine::instance(), SIGNAL( timerSeconds( unsigned int ) ),
|
connect( AudioEngine::instance(), SIGNAL( timerSeconds( unsigned int ) ),
|
||||||
SLOT( engineTick( unsigned int ) ), Qt::QueuedConnection );
|
SLOT( engineTick( unsigned int ) ), Qt::QueuedConnection );
|
||||||
|
@@ -234,7 +234,6 @@ TomahawkApp::TomahawkApp( int& argc, char *argv[] )
|
|||||||
m_mainwindow = new TomahawkWindow();
|
m_mainwindow = new TomahawkWindow();
|
||||||
m_mainwindow->setWindowTitle( "Tomahawk" );
|
m_mainwindow->setWindowTitle( "Tomahawk" );
|
||||||
m_mainwindow->show();
|
m_mainwindow->show();
|
||||||
connect( m_mainwindow, SIGNAL( settingsChanged() ), SIGNAL( settingsChanged() ) );
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -178,7 +178,7 @@ TomahawkWindow::setupSignals()
|
|||||||
connect( ui->actionToggleConnect, SIGNAL( triggered() ), APP->sipHandler(), SLOT( toggleConnect() ) );
|
connect( ui->actionToggleConnect, SIGNAL( triggered() ), APP->sipHandler(), SLOT( toggleConnect() ) );
|
||||||
connect( ui->actionAddPeerManually, SIGNAL( triggered() ), SLOT( addPeerManually() ) );
|
connect( ui->actionAddPeerManually, SIGNAL( triggered() ), SLOT( addPeerManually() ) );
|
||||||
connect( ui->actionAddFriendManually, SIGNAL( triggered() ), SLOT( addFriendManually() ) );
|
connect( ui->actionAddFriendManually, SIGNAL( triggered() ), SLOT( addFriendManually() ) );
|
||||||
connect( ui->actionRescanCollection, SIGNAL( triggered() ), SLOT( rescanCollectionManually() ) );
|
connect( ui->actionRescanCollection, SIGNAL( triggered() ), SLOT( updateCollectionManually() ) );
|
||||||
connect( ui->actionLoadXSPF, SIGNAL( triggered() ), SLOT( loadSpiff() ));
|
connect( ui->actionLoadXSPF, SIGNAL( triggered() ), SLOT( loadSpiff() ));
|
||||||
connect( ui->actionCreatePlaylist, SIGNAL( triggered() ), SLOT( createPlaylist() ));
|
connect( ui->actionCreatePlaylist, SIGNAL( triggered() ), SLOT( createPlaylist() ));
|
||||||
connect( ui->actionCreateAutomaticPlaylist, SIGNAL( triggered() ), SLOT( createAutomaticPlaylist() ));
|
connect( ui->actionCreateAutomaticPlaylist, SIGNAL( triggered() ), SLOT( createAutomaticPlaylist() ));
|
||||||
@@ -238,18 +238,11 @@ TomahawkWindow::showSettingsDialog()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// scan stuff
|
|
||||||
void
|
void
|
||||||
TomahawkWindow::rescanCollectionManually()
|
TomahawkWindow::updateCollectionManually()
|
||||||
{
|
{
|
||||||
TomahawkSettings* s = TomahawkSettings::instance();
|
if ( TomahawkSettings::instance()->hasScannerPath() )
|
||||||
bool ok;
|
ScanManager::instance()->runManualScan( TomahawkSettings::instance()->scannerPath() );
|
||||||
QString path = QInputDialog::getText( this, tr( "Enter path to music dir:" ),
|
|
||||||
tr( "Path pls" ), QLineEdit::Normal,
|
|
||||||
s->scannerPath(), &ok );
|
|
||||||
s->setValue( "scannerpath", path );
|
|
||||||
if ( ok && !path.isEmpty() )
|
|
||||||
ScanManager::instance()->runManualScan( path );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -44,7 +44,7 @@ public slots:
|
|||||||
void createPlaylist();
|
void createPlaylist();
|
||||||
void loadSpiff();
|
void loadSpiff();
|
||||||
void showSettingsDialog();
|
void showSettingsDialog();
|
||||||
void rescanCollectionManually();
|
void updateCollectionManually();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void onSipConnected();
|
void onSipConnected();
|
||||||
|
Reference in New Issue
Block a user