[vlc-commits] Only add items in the root playlist to the recent elements

Hugo Beauzée-Luyssen git at videolan.org
Mon Mar 7 17:16:26 CET 2016


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Mon Mar  7 17:15:15 2016 +0100| [e3d09f91ea5f24745d04f3bb8882967857986697] | committer: Hugo Beauzée-Luyssen

Only add items in the root playlist to the recent elements

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e3d09f91ea5f24745d04f3bb8882967857986697
---

 modules/gui/qt/components/playlist/standardpanel.cpp |    8 ++------
 modules/gui/qt/input_manager.cpp                     |    2 +-
 2 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/modules/gui/qt/components/playlist/standardpanel.cpp b/modules/gui/qt/components/playlist/standardpanel.cpp
index 26f0657..06e50c4 100644
--- a/modules/gui/qt/components/playlist/standardpanel.cpp
+++ b/modules/gui/qt/components/playlist/standardpanel.cpp
@@ -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:
diff --git a/modules/gui/qt/input_manager.cpp b/modules/gui/qt/input_manager.cpp
index f01fb67..996b286 100644
--- a/modules/gui/qt/input_manager.cpp
+++ b/modules/gui/qt/input_manager.cpp
@@ -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.



More information about the vlc-commits mailing list