mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
* Add Artist to hash even without a valid db-id.
This commit is contained in:
@@ -95,9 +95,9 @@ Artist::get( unsigned int id, const QString& name )
|
|||||||
artist_ptr a = artist_ptr( new Artist( id, name ), &QObject::deleteLater );
|
artist_ptr a = artist_ptr( new Artist( id, name ), &QObject::deleteLater );
|
||||||
a->setWeakRef( a.toWeakRef() );
|
a->setWeakRef( a.toWeakRef() );
|
||||||
|
|
||||||
|
s_artistsByName.insert( name, a );
|
||||||
if ( id > 0 )
|
if ( id > 0 )
|
||||||
{
|
{
|
||||||
s_artistsByName.insert( name, a );
|
|
||||||
s_artistsById.insert( id, a );
|
s_artistsById.insert( id, a );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -283,6 +283,7 @@ Artist::id() const
|
|||||||
|
|
||||||
if ( m_id > 0 )
|
if ( m_id > 0 )
|
||||||
s_artistsById[ m_id ] = m_ownRef.toStrongRef();
|
s_artistsById[ m_id ] = m_ownRef.toStrongRef();
|
||||||
|
|
||||||
s_idMutex.unlock();
|
s_idMutex.unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user