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:
@@ -379,6 +379,13 @@ SpotifyPlaylistUpdater::spotifyTracksMoved( const QVariantList& tracks, const QS
|
|||||||
|
|
||||||
|
|
||||||
// Find the position of the track to insert from
|
// 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 )
|
for ( QList< plentry_ptr >::iterator iter = entries.begin(); iter != entries.end(); ++iter )
|
||||||
{
|
{
|
||||||
if ( (*iter)->annotation() == newStartPos )
|
if ( (*iter)->annotation() == newStartPos )
|
||||||
@@ -395,6 +402,7 @@ SpotifyPlaylistUpdater::spotifyTracksMoved( const QVariantList& tracks, const QS
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
m_blockUpdatesForNextRevision = true;
|
m_blockUpdatesForNextRevision = true;
|
||||||
playlist()->createNewRevision( uuid(), playlist()->currentrevision(), entries );
|
playlist()->createNewRevision( uuid(), playlist()->currentrevision(), entries );
|
||||||
|
Reference in New Issue
Block a user