Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
03029fe3
Commit
03029fe3
authored
Feb 09, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playlist_search: enable all items if the search string is empty
(and remove an unused argument).
parent
846bb6fe
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
6 deletions
+31
-6
src/playlist/search.c
src/playlist/search.c
+31
-6
No files found.
src/playlist/search.c
View file @
03029fe3
/*****************************************************************************
* search.c : Search functions
*****************************************************************************
* Copyright (C) 1999-200
4
the VideoLAN team
* Copyright (C) 1999-200
9
the VideoLAN team
* $Id$
*
* Authors: Clément Stenac <zorglub@videolan.org>
...
...
@@ -127,8 +127,29 @@ playlist_item_t * playlist_ItemGetByInputId( playlist_t *p_playlist,
* Live search handling
***************************************************************************/
static
bool
playlist_LiveSearchUpdateInternal
(
playlist_t
*
p_playlist
,
playlist_item_t
*
p_root
,
/**
* Enable all items in the playlist
* @param p_root: the current root item
*/
static
void
playlist_LiveSearchClean
(
playlist_item_t
*
p_root
)
{
for
(
int
i
=
0
;
i
<
p_root
->
i_children
;
i
++
)
{
playlist_item_t
*
p_item
=
p_root
->
pp_children
[
i
];
if
(
p_item
->
i_children
>=
0
)
playlist_LiveSearchClean
(
p_item
);
p_item
->
i_flags
&=
~
PLAYLIST_DBL_FLAG
;
}
}
/**
* Enable/Disable items in the playlist according to the search argument
* @param p_root: the current root item
* @param psz_string: the string to search
* @return true if an item match
*/
static
bool
playlist_LiveSearchUpdateInternal
(
playlist_item_t
*
p_root
,
const
char
*
psz_string
)
{
int
i
;
...
...
@@ -138,7 +159,7 @@ static bool playlist_LiveSearchUpdateInternal( playlist_t *p_playlist,
playlist_item_t
*
p_item
=
p_root
->
pp_children
[
i
];
if
(
p_item
->
i_children
>
-
1
)
{
if
(
playlist_LiveSearchUpdateInternal
(
p_
playlist
,
p_
item
,
psz_string
)
||
if
(
playlist_LiveSearchUpdateInternal
(
p_item
,
psz_string
)
||
strcasestr
(
p_item
->
p_input
->
psz_name
,
psz_string
)
)
{
p_item
->
i_flags
&=
~
PLAYLIST_DBL_FLAG
;
...
...
@@ -172,7 +193,11 @@ int playlist_LiveSearchUpdate( playlist_t *p_playlist, playlist_item_t *p_root,
{
PL_ASSERT_LOCKED
;
pl_priv
(
p_playlist
)
->
b_reset_currently_playing
=
true
;
playlist_LiveSearchUpdateInternal
(
p_playlist
,
p_root
,
psz_string
);
if
(
*
psz_string
)
playlist_LiveSearchUpdateInternal
(
p_root
,
psz_string
);
else
playlist_LiveSearchClean
(
p_root
);
vlc_cond_signal
(
&
pl_priv
(
p_playlist
)
->
signal
);
return
VLC_SUCCESS
;
}
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