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
206a6d2e
Commit
206a6d2e
authored
Jun 14, 2006
by
Yoann Peronneau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* playlist/xspf.c: handles empty nodes
parent
9d179404
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
modules/misc/playlist/xspf.c
modules/misc/playlist/xspf.c
+14
-7
No files found.
modules/misc/playlist/xspf.c
View file @
206a6d2e
...
...
@@ -122,11 +122,17 @@ static void xspf_export_item( playlist_item_t *p_item, FILE *p_file,
return
;
}
/* don't write empty nodes */
if
(
p_item
->
i_children
==
0
)
{
return
;
}
/* leaves can be written directly */
fprintf
(
p_file
,
"
\t\t
<track>
\n
"
);
/* print identifier and increase the counter */
fprintf
(
p_file
,
"
\t\t\t
<identifier>%
d
</identifier>
\n
"
,
*
p_i_count
);
fprintf
(
p_file
,
"
\t\t\t
<identifier>%
i
</identifier>
\n
"
,
*
p_i_count
);
(
*
p_i_count
)
++
;
/* -> the location */
...
...
@@ -226,13 +232,14 @@ static void xspf_extension_item( playlist_item_t *p_item, FILE *p_file,
if
(
!
p_item
)
return
;
/* if we get a node here, we must traverse it */
if
(
p_item
->
i_children
>
0
)
if
(
p_item
->
i_children
>
=
0
)
{
int
i
;
fprintf
(
p_file
,
"
\t\t
<node>
\n
"
);
fprintf
(
p_file
,
"
\t\t\t
<title>%s</title>
\n
"
,
p_item
->
p_input
->
psz_name
);
char
*
psz_temp
;
psz_temp
=
convert_xml_special_chars
(
p_item
->
p_input
->
psz_name
);
fprintf
(
p_file
,
"
\t\t
<node title=
\"
%s
\"
>
\n
"
,
*
psz_temp
?
p_item
->
p_input
->
psz_name
:
""
);
free
(
psz_temp
);
for
(
i
=
0
;
i
<
p_item
->
i_children
;
i
++
)
{
...
...
@@ -245,7 +252,7 @@ static void xspf_extension_item( playlist_item_t *p_item, FILE *p_file,
/* print leaf and increase the counter */
fprintf
(
p_file
,
"
\t\t\t
<item href=
\"
%
d
\"
/>
\n
"
,
*
p_i_count
);
fprintf
(
p_file
,
"
\t\t\t
<item href=
\"
%
i
\"
/>
\n
"
,
*
p_i_count
);
(
*
p_i_count
)
++
;
return
;
...
...
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