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
0d0da5ab
Commit
0d0da5ab
authored
Jul 11, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
folder cover: lift PATH_MAX limit
parent
ee19e3d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
12 deletions
+21
-12
modules/meta_engine/folder.c
modules/meta_engine/folder.c
+21
-12
No files found.
modules/meta_engine/folder.c
View file @
0d0da5ab
...
...
@@ -79,10 +79,6 @@ static int FindMeta( vlc_object_t *p_this )
input_item_t
*
p_item
=
p_finder
->
p_item
;
bool
b_have_art
=
false
;
int
i
;
struct
stat
a
;
char
psz_filename
[
MAX_PATH
];
if
(
!
p_item
)
return
VLC_EGENERIC
;
...
...
@@ -101,22 +97,34 @@ static int FindMeta( vlc_object_t *p_this )
else
*
psz_path
=
'\0'
;
/* relative path */
for
(
i
=
-
1
;
!
b_have_art
&&
i
<
i_covers
;
i
++
)
for
(
i
nt
i
=
-
1
;
!
b_have_art
&&
i
<
i_covers
;
i
++
)
{
const
char
*
filename
;
char
*
filebuf
,
*
filepath
;
if
(
i
==
-
1
)
/* higher priority : configured filename */
{
char
*
psz_userfile
=
var_InheritString
(
p_this
,
"album-art-filename"
);
if
(
!
psz_userfile
)
filebuf
=
var_InheritString
(
p_this
,
"album-art-filename"
);
if
(
filebuf
==
NULL
)
continue
;
snprintf
(
psz_filename
,
MAX_PATH
,
"%s%s"
,
psz_path
,
psz_userfile
);
free
(
psz_userfile
);
filename
=
filebuf
;
}
else
snprintf
(
psz_filename
,
MAX_PATH
,
"%s%s"
,
psz_path
,
cover_files
[
i
]
);
{
filename
=
cover_files
[
i
];
filebuf
=
NULL
;
}
if
(
asprintf
(
&
filepath
,
"%s%s"
,
psz_path
,
filename
)
==
-
1
)
filepath
=
NULL
;
free
(
filebuf
);
if
(
unlikely
(
filepath
!=
NULL
)
)
continue
;
if
(
vlc_stat
(
psz_filename
,
&
a
)
!=
-
1
)
struct
stat
dummy
;
if
(
vlc_stat
(
filepath
,
&
dummy
)
==
0
)
{
char
*
psz_uri
=
make_URI
(
psz_filename
,
"file"
);
char
*
psz_uri
=
make_URI
(
filepath
,
"file"
);
if
(
psz_uri
)
{
input_item_SetArtURL
(
p_item
,
psz_uri
);
...
...
@@ -124,6 +132,7 @@ static int FindMeta( vlc_object_t *p_this )
b_have_art
=
true
;
}
}
free
(
filepath
);
}
free
(
psz_path
);
...
...
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