1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-23 09:19:41 +01:00

* Add Artist to hash even without a valid db-id.

This commit is contained in:
Christian Muehlhaeuser 2012-11-14 02:23:54 +01:00
parent 20b73b4470
commit 60f4263200

View File

@ -95,9 +95,9 @@ Artist::get( unsigned int id, const QString& name )
artist_ptr a = artist_ptr( new Artist( id, name ), &QObject::deleteLater );
a->setWeakRef( a.toWeakRef() );
s_artistsByName.insert( name, a );
if ( id > 0 )
{
s_artistsByName.insert( name, a );
s_artistsById.insert( id, a );
}
@ -283,6 +283,7 @@ Artist::id() const
if ( m_id > 0 )
s_artistsById[ m_id ] = m_ownRef.toStrongRef();
s_idMutex.unlock();
}