Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
451
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
329758a9
Commit
329758a9
authored
3 years ago
by
Prince Gupta
Committed by
Hugo Beauzée-Luyssen
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
medialibrary: add thumbnail to vlc_ml_genre_t
parent
52424a5e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!845
qt: save genre cover in medialibrary
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/vlc_media_library.h
+1
-0
1 addition, 0 deletions
include/vlc_media_library.h
modules/misc/medialibrary/entities.cpp
+18
-1
18 additions, 1 deletion
modules/misc/medialibrary/entities.cpp
src/misc/medialibrary.c
+1
-0
1 addition, 0 deletions
src/misc/medialibrary.c
with
20 additions
and
1 deletion
include/vlc_media_library.h
+
1
−
0
View file @
329758a9
...
...
@@ -295,6 +295,7 @@ typedef struct vlc_ml_genre_t
int64_t
i_id
;
char
*
psz_name
;
size_t
i_nb_tracks
;
vlc_ml_thumbnail_t
thumbnails
[
VLC_ML_THUMBNAIL_SIZE_COUNT
];
}
vlc_ml_genre_t
;
typedef
struct
vlc_ml_media_list_t
...
...
This diff is collapsed.
Click to expand it.
modules/misc/medialibrary/entities.cpp
+
18
−
1
View file @
329758a9
...
...
@@ -385,7 +385,24 @@ bool Convert( const medialibrary::IGenre* input, vlc_ml_genre_t& output )
output
.
i_id
=
input
->
id
();
output
.
i_nb_tracks
=
input
->
nbTracks
();
assert
(
input
->
name
().
empty
()
==
false
);
return
strdup_helper
(
input
->
name
(),
output
.
psz_name
);
if
(
!
strdup_helper
(
input
->
name
(),
output
.
psz_name
)
)
return
false
;
for
(
int
i
=
VLC_ML_THUMBNAIL_SMALL
;
i
<
VLC_ML_THUMBNAIL_SIZE_COUNT
;
++
i
)
{
const
auto
sizeType
=
static_cast
<
medialibrary
::
ThumbnailSizeType
>
(
i
);
if
(
input
->
hasThumbnail
(
sizeType
)
)
{
const
auto
thumbnailMrl
=
input
->
thumbnailMrl
(
sizeType
);
assert
(
!
thumbnailMrl
.
empty
()
);
if
(
!
strdup_helper
(
thumbnailMrl
,
output
.
thumbnails
[
i
].
psz_mrl
)
)
return
false
;
}
}
return
true
;
}
bool
Convert
(
const
medialibrary
::
IShow
*
input
,
vlc_ml_show_t
&
output
)
...
...
This diff is collapsed.
Click to expand it.
src/misc/medialibrary.c
+
1
−
0
View file @
329758a9
...
...
@@ -227,6 +227,7 @@ void vlc_ml_genre_release( vlc_ml_genre_t* p_genre )
{
if
(
p_genre
==
NULL
)
return
;
vlc_ml_thumbnails_release
(
p_genre
->
thumbnails
);
free
(
p_genre
->
psz_name
);
free
(
p_genre
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment