[vlc-commits] [Git][videolan/vlc][master] medialibrary: add filename field on media
Hugo Beauzée-Luyssen (@chouquette)
gitlab at videolan.org
Sat Jul 30 17:46:13 UTC 2022
Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC
Commits:
fc9a43be by Aymeric Guillien at 2022-07-30T17:27:58+00:00
medialibrary: add filename field on media
- - - - -
3 changed files:
- include/vlc_media_library.h
- modules/misc/medialibrary/entities.cpp
- src/misc/medialibrary.c
Changes:
=====================================
include/vlc_media_library.h
=====================================
@@ -205,6 +205,7 @@ typedef struct vlc_ml_media_t
float f_progress;
time_t i_last_played_date;
char* psz_title;
+ char* psz_filename;
vlc_ml_thumbnail_t thumbnails[VLC_ML_THUMBNAIL_SIZE_COUNT];
=====================================
modules/misc/medialibrary/entities.cpp
=====================================
@@ -249,6 +249,8 @@ bool Convert( const medialibrary::IMedia* input, vlc_ml_media_t& output )
output.p_files = ml_convert_list<vlc_ml_file_list_t, vlc_ml_file_t>( files );
if ( output.p_files == nullptr )
return false;
+ if ( strdup_helper( input->fileName(), output.psz_filename ) == false )
+ return false;
if ( convertTracks( input, output ) == false )
return false;
=====================================
src/misc/medialibrary.c
=====================================
@@ -172,6 +172,7 @@ static void vlc_ml_media_release_inner( vlc_ml_media_t* p_media )
{
vlc_ml_file_list_release( p_media->p_files );
vlc_ml_media_release_tracks_inner( p_media->p_tracks );
+ free( p_media->psz_filename );
free( p_media->psz_title );
vlc_ml_thumbnails_release( p_media->thumbnails );
switch( p_media->i_subtype )
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/fc9a43be3e3c788ce66428a8daffa7d88b7d56d5
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/fc9a43be3e3c788ce66428a8daffa7d88b7d56d5
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list