[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:23:05 CET 2016
vlc/vlc-2.2 | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Mon Mar 7 17:15:15 2016 +0100| [265a5fb3085a3045f8c08ceb4a85d7e6c4ed9c90] | committer: Hugo Beauzée-Luyssen
Only add items in the root playlist to the recent elements
(cherry picked from commit e3d09f91ea5f24745d04f3bb8882967857986697)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=265a5fb3085a3045f8c08ceb4a85d7e6c4ed9c90
---
modules/gui/qt4/components/playlist/standardpanel.cpp | 8 ++------
modules/gui/qt4/input_manager.cpp | 2 +-
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/modules/gui/qt4/components/playlist/standardpanel.cpp b/modules/gui/qt4/components/playlist/standardpanel.cpp
index 19c67dc..f6ef2ab 100644
--- a/modules/gui/qt4/components/playlist/standardpanel.cpp
+++ b/modules/gui/qt4/components/playlist/standardpanel.cpp
@@ -352,9 +352,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:
@@ -373,9 +371,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/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp
index 89f8ba4..0a65b6d 100644
--- a/modules/gui/qt4/input_manager.cpp
+++ b/modules/gui/qt4/input_manager.cpp
@@ -143,7 +143,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