[vlc-commits] playlist: remove constant playlist_Add() parameter

Rémi Denis-Courmont git at videolan.org
Sat Nov 19 16:26:05 CET 2016


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Nov 19 17:24:31 2016 +0200| [5111ca464be74a116201499c49f49af0db6557b3] | committer: Rémi Denis-Courmont

playlist: remove constant playlist_Add() parameter

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

 include/vlc_playlist.h                       | 2 +-
 modules/control/dbus/dbus_player.c           | 2 +-
 modules/gui/skins2/commands/cmd_add_item.cpp | 2 +-
 src/playlist/item.c                          | 5 ++---
 4 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/include/vlc_playlist.h b/include/vlc_playlist.h
index 5fef490..6e42cb5 100644
--- a/include/vlc_playlist.h
+++ b/include/vlc_playlist.h
@@ -321,7 +321,7 @@ VLC_API int playlist_ServicesDiscoveryControl( playlist_t *, const char *, int,
  ********************************************************/
 
 /******************** Item addition ********************/
-VLC_API int playlist_Add( playlist_t *, const char *, const char *, int, bool );
+VLC_API int playlist_Add( playlist_t *, const char *, const char *, int );
 VLC_API int playlist_AddExt( playlist_t *, const char *, const char *, int, int, const char *const *, unsigned, bool );
 VLC_API int playlist_AddInput( playlist_t *, input_item_t *, int, bool );
 VLC_API playlist_item_t * playlist_NodeAddInput( playlist_t *, input_item_t *, playlist_item_t *, int, int );
diff --git a/modules/control/dbus/dbus_player.c b/modules/control/dbus/dbus_player.c
index 04aab4e..eaee6d2 100644
--- a/modules/control/dbus/dbus_player.c
+++ b/modules/control/dbus/dbus_player.c
@@ -229,7 +229,7 @@ DBUS_METHOD( OpenUri )
         return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
     }
 
-    playlist_Add( PL, psz_mrl, NULL, PLAYLIST_GO, true );
+    playlist_Add( PL, psz_mrl, NULL, PLAYLIST_GO );
 
     REPLY_SEND;
 }
diff --git a/modules/gui/skins2/commands/cmd_add_item.cpp b/modules/gui/skins2/commands/cmd_add_item.cpp
index b39e10c..374ed3b 100644
--- a/modules/gui/skins2/commands/cmd_add_item.cpp
+++ b/modules/gui/skins2/commands/cmd_add_item.cpp
@@ -44,5 +44,5 @@ void CmdAddItem::execute()
         free( psz_uri );
     }
     playlist_Add( pPlaylist, m_name.c_str(), NULL,
-                  m_playNow ? PLAYLIST_GO : 0, true );
+                  m_playNow ? PLAYLIST_GO : 0 );
 }
diff --git a/src/playlist/item.c b/src/playlist/item.c
index 4fed025..501317a 100644
--- a/src/playlist/item.c
+++ b/src/playlist/item.c
@@ -448,14 +448,13 @@ void playlist_Clear( playlist_t * p_playlist, bool b_locked )
  * \param psz_uri the mrl to add to the playlist
  * \param psz_name a text giving a name or description of this item
  * \param i_mode the mode used when adding
- * \param b_playlist TRUE for playlist, FALSE for media library
  * \return VLC_SUCCESS or a VLC error code
  */
 int playlist_Add( playlist_t *p_playlist, const char *psz_uri,
-                  const char *psz_name, int i_mode, bool b_playlist )
+                  const char *psz_name, int i_mode )
 {
     return playlist_AddExt( p_playlist, psz_uri, psz_name,
-                            i_mode, 0, NULL, 0, b_playlist );
+                            i_mode, 0, NULL, 0, true );
 }
 
 /**



More information about the vlc-commits mailing list