Commit e3d09f91 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Only add items in the root playlist to the recent elements

parent 6abe0495
......@@ -365,9 +365,7 @@ void StandardPLPanel::popupAction( QAction *action )
foreach( const QString &file, uris )
a.uris << qtu( toURI( toNativeSeparators( file ) ) );
action->setData( QVariant::fromValue( a ) );
if ( model->action( action, list ) )
foreach( const QString &file, a.uris )
RecentsMRL::getInstance( p_intf )->addRecent( file );
model->action( action, list );
break;
case VLCModelSubInterface::ACTION_ENQUEUEDIR:
......@@ -386,9 +384,7 @@ void StandardPLPanel::popupAction( QAction *action )
a.options = dialog->getOptions();
if ( a.uris.isEmpty() ) return;
action->setData( QVariant::fromValue( a ) );
if ( model->action( action, list ) )
foreach( const QString &file, a.uris )
RecentsMRL::getInstance( p_intf )->addRecent( file );
model->action( action, list );
break;
case VLCModelSubInterface::ACTION_SAVETOPLAYLIST:
......
......@@ -129,7 +129,7 @@ void InputManager::setInput( input_thread_t *_p_input )
playlist_Lock( THEPL );
// Add root items only
playlist_item_t* p_node = playlist_CurrentPlayingItem( THEPL );
if ( p_node != NULL && ( p_node->p_parent == NULL || p_node->i_children == -1 ) )
if ( p_node != NULL && p_node->p_parent != NULL && p_node->p_parent->i_id == THEPL->p_playing->i_id )
{
// Save the latest URI to avoid asking to restore the
// position on the same input file.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment