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
0bf39ed3
Commit
0bf39ed3
authored
Feb 28, 2007
by
Yoann Peronneau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* src/playlist/loadsave.c: create directory before saving Media Library
parent
7815fcbd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
src/playlist/loadsave.c
src/playlist/loadsave.c
+12
-3
No files found.
src/playlist/loadsave.c
View file @
0bf39ed3
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
#include <vlc/vlc.h>
#include <vlc/vlc.h>
#include <vlc_playlist.h>
#include <vlc_playlist.h>
#include "playlist_internal.h"
#include "playlist_internal.h"
#include "misc/configuration.h"
#include <vlc_charset.h>
#include <vlc_charset.h>
#include <errno.h>
#include <errno.h>
...
@@ -118,14 +119,22 @@ int playlist_MLLoad( playlist_t *p_playlist )
...
@@ -118,14 +119,22 @@ int playlist_MLLoad( playlist_t *p_playlist )
int
playlist_MLDump
(
playlist_t
*
p_playlist
)
int
playlist_MLDump
(
playlist_t
*
p_playlist
)
{
{
char
*
psz_uri
,
*
psz_homedir
=
p_playlist
->
p_libvlc
->
psz_homedir
;
char
*
psz_uri
,
*
psz_homedir
=
p_playlist
->
p_libvlc
->
psz_homedir
;
if
(
!
config_GetInt
(
p_playlist
,
"media-library"
)
)
return
VLC_SUCCESS
;
if
(
!
config_GetInt
(
p_playlist
,
"media-library"
)
)
return
VLC_SUCCESS
;
if
(
!
psz_homedir
)
if
(
!
psz_homedir
)
{
{
msg_Err
(
p_playlist
,
"no home directory, cannot
load
media library"
)
;
msg_Err
(
p_playlist
,
"no home directory, cannot
save
media library"
)
;
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
asprintf
(
&
psz_uri
,
"%s"
DIR_SEP
CONFIG_DIR
DIR_SEP
char
psz_dirname
[
strlen
(
psz_homedir
)
+
sizeof
(
DIR_SEP
CONFIG_DIR
)
];
sprintf
(
psz_dirname
,
"%s"
DIR_SEP
CONFIG_DIR
,
psz_homedir
);
if
(
config_CreateDir
(
(
vlc_object_t
*
)
p_playlist
,
psz_dirname
)
)
{
return
VLC_EGENERIC
;
}
asprintf
(
&
psz_uri
,
"%s"
DIR_SEP
"%s"
,
psz_dirname
,
"ml.xsp"
,
psz_homedir
);
"ml.xsp"
,
psz_homedir
);
stats_TimerStart
(
p_playlist
,
"ML Dump"
,
STATS_TIMER_ML_DUMP
);
stats_TimerStart
(
p_playlist
,
"ML Dump"
,
STATS_TIMER_ML_DUMP
);
playlist_Export
(
p_playlist
,
psz_uri
,
p_playlist
->
p_ml_category
,
playlist_Export
(
p_playlist
,
psz_uri
,
p_playlist
->
p_ml_category
,
...
...
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