1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-06 06:07:37 +02:00

support moving to beginning

This commit is contained in:
Leo Franchi
2012-04-13 22:05:25 -04:00
parent df37fd42fd
commit 8069baf911

View File

@@ -379,6 +379,13 @@ SpotifyPlaylistUpdater::spotifyTracksMoved( const QVariantList& tracks, const QS
// Find the position of the track to insert from
if ( newStartPos.isEmpty() )
{
while ( !toMove.isEmpty() )
entries.prepend( toMove.takeLast() );
}
else
{
for ( QList< plentry_ptr >::iterator iter = entries.begin(); iter != entries.end(); ++iter )
{
if ( (*iter)->annotation() == newStartPos )
@@ -395,6 +402,7 @@ SpotifyPlaylistUpdater::spotifyTracksMoved( const QVariantList& tracks, const QS
break;
}
}
}
m_blockUpdatesForNextRevision = true;
playlist()->createNewRevision( uuid(), playlist()->currentrevision(), entries );