Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
ea9654b7
Commit
ea9654b7
authored
Sep 23, 2006
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
utf8_stat doesn't work if 2nd arg is NULL ... too bad :(
parent
7810e789
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
7 deletions
+18
-7
modules/meta_engine/dummy.c
modules/meta_engine/dummy.c
+9
-5
src/input/input.c
src/input/input.c
+9
-2
No files found.
modules/meta_engine/dummy.c
View file @
ea9654b7
...
...
@@ -33,6 +33,11 @@
#include <vlc_meta_engine.h>
#include <charset.h>
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
/*****************************************************************************
* Local prototypes
*****************************************************************************/
...
...
@@ -80,22 +85,21 @@ static int FindMeta( vlc_object_t *p_this )
CHECK
(
language
,
LANGUAGE
)
CHECK
(
arturl
,
ART_URL
)
if
(
!
(
i_meta
&
VLC_META_ENGINE_ART_URL
)
)
if
(
!
(
i_meta
&
VLC_META_ENGINE_ART_URL
)
&&
(
p_me
->
i_mandatory
&
VLC_META_ENGINE_ART_URL
)
)
{
if
(
i_meta
&
VLC_META_ENGINE_COLLECTION
&&
i_meta
&
VLC_META_ENGINE_ARTIST
)
{
FILE
*
p_file
;
char
*
psz_filename
;
struct
stat
a
;
asprintf
(
&
psz_filename
,
"file://%s/"
CONFIG_DIR
"/art/%s/%s/art.jpg"
,
/* ahem ... we can have other filetype too... */
p_me
->
p_libvlc
->
psz_homedir
,
p_item
->
p_meta
->
psz_artist
,
p_item
->
p_meta
->
psz_album
);
p_file
=
utf8_fopen
(
psz_filename
+
7
,
"r"
);
if
(
p_file
)
if
(
utf8_stat
(
psz_filename
+
7
,
&
a
)
!=
-
1
)
{
fclose
(
p_file
);
vlc_meta_SetArtURL
(
p_item
->
p_meta
,
psz_filename
);
i_meta
|=
VLC_META_ENGINE_ART_URL
;
}
...
...
src/input/input.c
View file @
ea9654b7
...
...
@@ -43,6 +43,10 @@
#include "charset.h"
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
/*****************************************************************************
* Local prototypes
*****************************************************************************/
...
...
@@ -2526,7 +2530,9 @@ vlc_bool_t input_AddSubtitles( input_thread_t *p_input, char *psz_subtitle,
return
VLC_TRUE
;
}
#define MAX_PATH 260
#ifndef MAX_PATH
# define MAX_PATH 250
#endif
int
input_DownloadAndCacheArt
(
vlc_object_t
*
p_parent
,
input_item_t
*
p_item
)
{
char
*
psz_artist
;
...
...
@@ -2535,6 +2541,7 @@ int input_DownloadAndCacheArt( vlc_object_t *p_parent, input_item_t *p_item )
char
*
psz_filename
;
int
i_status
=
VLC_EGENERIC
;
int
i_ret
;
struct
stat
a
;
if
(
!
p_item
->
p_meta
||
!
p_item
->
p_meta
->
psz_arturl
...
...
@@ -2560,7 +2567,7 @@ int input_DownloadAndCacheArt( vlc_object_t *p_parent, input_item_t *p_item )
msg_Dbg
(
p_parent
,
"Saving album art to %s"
,
psz_filename
);
/* Check if file exists */
i_ret
=
utf8_stat
(
psz_filename
+
7
,
NULL
);
i_ret
=
utf8_stat
(
psz_filename
+
7
,
&
a
);
if
(
i_ret
==
0
)
{
msg_Dbg
(
p_parent
,
"Album art %s already exists"
,
psz_filename
);
...
...
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