Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
c3d342a2
Commit
c3d342a2
authored
Feb 12, 2010
by
Jakob Leben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playlist: allow non-recursive search
parent
38e127f6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
include/vlc_playlist.h
include/vlc_playlist.h
+1
-1
modules/misc/lua/libs/playlist.c
modules/misc/lua/libs/playlist.c
+1
-1
src/playlist/search.c
src/playlist/search.c
+5
-5
No files found.
include/vlc_playlist.h
View file @
c3d342a2
...
@@ -353,7 +353,7 @@ VLC_EXPORT( playlist_item_t *, playlist_NodeAddInput, ( playlist_t *, input_item
...
@@ -353,7 +353,7 @@ VLC_EXPORT( playlist_item_t *, playlist_NodeAddInput, ( playlist_t *, input_item
VLC_EXPORT
(
playlist_item_t
*
,
playlist_ItemGetById
,
(
playlist_t
*
,
int
)
);
VLC_EXPORT
(
playlist_item_t
*
,
playlist_ItemGetById
,
(
playlist_t
*
,
int
)
);
VLC_EXPORT
(
playlist_item_t
*
,
playlist_ItemGetByInput
,
(
playlist_t
*
,
input_item_t
*
)
);
VLC_EXPORT
(
playlist_item_t
*
,
playlist_ItemGetByInput
,
(
playlist_t
*
,
input_item_t
*
)
);
VLC_EXPORT
(
int
,
playlist_LiveSearchUpdate
,
(
playlist_t
*
,
playlist_item_t
*
,
const
char
*
)
);
VLC_EXPORT
(
int
,
playlist_LiveSearchUpdate
,
(
playlist_t
*
,
playlist_item_t
*
,
const
char
*
,
bool
)
);
/********************************************************
/********************************************************
* Tree management
* Tree management
...
...
modules/misc/lua/libs/playlist.c
View file @
c3d342a2
...
@@ -265,7 +265,7 @@ static int vlclua_playlist_search( lua_State *L )
...
@@ -265,7 +265,7 @@ static int vlclua_playlist_search( lua_State *L )
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
const
char
*
psz_string
=
luaL_optstring
(
L
,
1
,
""
);
const
char
*
psz_string
=
luaL_optstring
(
L
,
1
,
""
);
PL_LOCK
;
PL_LOCK
;
playlist_LiveSearchUpdate
(
p_playlist
,
p_playlist
->
p_root
,
psz_string
);
playlist_LiveSearchUpdate
(
p_playlist
,
p_playlist
->
p_root
,
psz_string
,
true
);
PL_UNLOCK
;
PL_UNLOCK
;
push_playlist_item
(
L
,
p_playlist
->
p_root
);
push_playlist_item
(
L
,
p_playlist
->
p_root
);
return
1
;
return
1
;
...
...
src/playlist/search.c
View file @
c3d342a2
...
@@ -107,7 +107,7 @@ static void playlist_LiveSearchClean( playlist_item_t *p_root )
...
@@ -107,7 +107,7 @@ static void playlist_LiveSearchClean( playlist_item_t *p_root )
* @return true if an item match
* @return true if an item match
*/
*/
static
bool
playlist_LiveSearchUpdateInternal
(
playlist_item_t
*
p_root
,
static
bool
playlist_LiveSearchUpdateInternal
(
playlist_item_t
*
p_root
,
const
char
*
psz_string
)
const
char
*
psz_string
,
bool
b_recursive
)
{
{
int
i
;
int
i
;
bool
b_match
=
false
;
bool
b_match
=
false
;
...
@@ -116,8 +116,8 @@ static bool playlist_LiveSearchUpdateInternal( playlist_item_t *p_root,
...
@@ -116,8 +116,8 @@ static bool playlist_LiveSearchUpdateInternal( playlist_item_t *p_root,
bool
b_enable
=
false
;
bool
b_enable
=
false
;
playlist_item_t
*
p_item
=
p_root
->
pp_children
[
i
];
playlist_item_t
*
p_item
=
p_root
->
pp_children
[
i
];
// Go recurssively if their is some children
// Go recurssively if their is some children
if
(
p_item
->
i_children
>=
0
&&
if
(
b_recursive
&&
p_item
->
i_children
>=
0
&&
playlist_LiveSearchUpdateInternal
(
p_item
,
psz_string
)
)
playlist_LiveSearchUpdateInternal
(
p_item
,
psz_string
,
true
)
)
{
{
b_enable
=
true
;
b_enable
=
true
;
}
}
...
@@ -163,12 +163,12 @@ static bool playlist_LiveSearchUpdateInternal( playlist_item_t *p_root,
...
@@ -163,12 +163,12 @@ static bool playlist_LiveSearchUpdateInternal( playlist_item_t *p_root,
* @return VLC_SUCCESS
* @return VLC_SUCCESS
*/
*/
int
playlist_LiveSearchUpdate
(
playlist_t
*
p_playlist
,
playlist_item_t
*
p_root
,
int
playlist_LiveSearchUpdate
(
playlist_t
*
p_playlist
,
playlist_item_t
*
p_root
,
const
char
*
psz_string
)
const
char
*
psz_string
,
bool
b_recursive
)
{
{
PL_ASSERT_LOCKED
;
PL_ASSERT_LOCKED
;
pl_priv
(
p_playlist
)
->
b_reset_currently_playing
=
true
;
pl_priv
(
p_playlist
)
->
b_reset_currently_playing
=
true
;
if
(
*
psz_string
)
if
(
*
psz_string
)
playlist_LiveSearchUpdateInternal
(
p_root
,
psz_string
);
playlist_LiveSearchUpdateInternal
(
p_root
,
psz_string
,
b_recursive
);
else
else
playlist_LiveSearchClean
(
p_root
);
playlist_LiveSearchClean
(
p_root
);
vlc_cond_signal
(
&
pl_priv
(
p_playlist
)
->
signal
);
vlc_cond_signal
(
&
pl_priv
(
p_playlist
)
->
signal
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment