mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 11:20:22 +02:00
If people reuse the same requestId, reassign it for them and print a
warning. Will cause problems if they are relying on the requestId to map to something, but in that case they'd have problems mapping multiple things to the same requestId in the first place...
This commit is contained in:
@@ -199,8 +199,12 @@ InfoSystemWorker::getInfo( Tomahawk::InfoSystem::InfoRequestData requestData, ui
|
||||
|
||||
foundOne = true;
|
||||
|
||||
if ( allSources )
|
||||
if ( allSources || m_savedRequestMap.contains( requestData.requestId ) )
|
||||
{
|
||||
if ( m_savedRequestMap.contains( requestData.requestId ) )
|
||||
tDebug() << Q_FUNC_INFO << "Warning: reassigning requestId because it already exists";
|
||||
requestData.internalId = TomahawkUtils::infosystemRequestId();
|
||||
}
|
||||
else
|
||||
requestData.internalId = requestData.requestId;
|
||||
|
||||
|
Reference in New Issue
Block a user