[vlc-commits] [Git][videolan/vlc][master] 7 commits: medialib: Expose playlist nb audio/video/unknown properties
Rémi Denis-Courmont (@Courmisch)
gitlab at videolan.org
Sat Feb 26 08:30:53 UTC 2022
Rémi Denis-Courmont pushed to branch master at VideoLAN / VLC
Commits:
79905ca6 by Hugo Beauzée-Luyssen at 2022-02-26T08:08:10+00:00
medialib: Expose playlist nb audio/video/unknown properties
- - - - -
12572d1b by Hugo Beauzée-Luyssen at 2022-02-26T08:08:10+00:00
medialib: Bind duration properties
- - - - -
0c4e0191 by Hugo Beauzée-Luyssen at 2022-02-26T08:08:10+00:00
medialib: Bind new media group properties
- - - - -
8f168f44 by Hugo Beauzée-Luyssen at 2022-02-26T08:08:10+00:00
medialib: Use correct types for media group properties
Date are now exposed as time_t
Duration should have always been an int64_t
And replace unsigned int by uint32_t for coherence
- - - - -
53797783 by Hugo Beauzée-Luyssen at 2022-02-26T08:08:10+00:00
medialib: Bind artist number of present tracks
- - - - -
bab97ff0 by Hugo Beauzée-Luyssen at 2022-02-26T08:08:10+00:00
medialib: Use proper types for album properties
- - - - -
a5eb80ea by Hugo Beauzée-Luyssen at 2022-02-26T08:08:10+00:00
medialib: Expose missing album properties
- - - - -
2 changed files:
- include/vlc_media_library.h
- modules/misc/medialibrary/entities.cpp
Changes:
=====================================
include/vlc_media_library.h
=====================================
@@ -232,11 +232,22 @@ typedef struct vlc_ml_group_t
char* psz_name;
- unsigned int i_nb_total_media;
+ uint32_t i_nb_total_media;
+ uint32_t i_nb_video;
+ uint32_t i_nb_audio;
+ uint32_t i_nb_unknown;
+ uint32_t i_nb_present_media;
+ uint32_t i_nb_present_video;
+ uint32_t i_nb_present_audio;
+ uint32_t i_nb_present_unknown;
+
+ uint32_t i_nb_seen;
+ uint32_t i_nb_present_seen;
- unsigned int i_duration;
+ int64_t i_duration;
- uint32_t i_creation_date;
+ time_t i_creation_date;
+ time_t i_last_modification_date;
} vlc_ml_group_t;
typedef struct vlc_ml_playlist_t
@@ -250,10 +261,20 @@ typedef struct vlc_ml_playlist_t
char* psz_artwork_mrl;
unsigned int i_nb_media;
+ uint32_t i_nb_video;
+ uint32_t i_nb_audio;
+ uint32_t i_nb_unknown;
+
unsigned int i_nb_present_media;
+ uint32_t i_nb_present_video;
+ uint32_t i_nb_present_audio;
+ uint32_t i_nb_present_unknown;
uint32_t i_creation_date;
+ int64_t i_duration; /* In ms */
+ uint32_t i_nb_duration_unknown;
+
bool b_is_read_only;
} vlc_ml_playlist_t;
@@ -267,6 +288,7 @@ typedef struct vlc_ml_artist_t
unsigned int i_nb_album;
unsigned int i_nb_tracks;
+ uint32_t i_nb_present_tracks;
} vlc_ml_artist_t;
typedef struct vlc_ml_artist_list_t
@@ -283,8 +305,10 @@ typedef struct vlc_ml_album_t {
char* psz_artist;
int64_t i_artist_id;
- size_t i_nb_tracks;
- unsigned int i_duration;
+ uint32_t i_nb_tracks;
+ uint32_t i_nb_present_tracks;
+ uint32_t i_nb_discs;
+ int64_t i_duration; /* in ms */
unsigned int i_year;
} vlc_ml_album_t;
=====================================
modules/misc/medialibrary/entities.cpp
=====================================
@@ -305,6 +305,8 @@ bool Convert( const medialibrary::IAlbum* input, vlc_ml_album_t& output )
{
output.i_id = input->id();
output.i_nb_tracks = input->nbTracks();
+ output.i_nb_present_tracks = input->nbPresentTracks();
+ output.i_nb_discs = input->nbDiscs();
output.i_duration = input->duration();
output.i_year = input->releaseYear();
@@ -355,6 +357,7 @@ bool Convert( const medialibrary::IArtist* input, vlc_ml_artist_t& output )
output.i_id = input->id();
output.i_nb_album = input->nbAlbums();
output.i_nb_tracks = input->nbTracks();
+ output.i_nb_present_tracks = input->nbPresentTracks();
output.psz_name = strdup( artistName( input ) );
if ( unlikely( output.psz_name == nullptr ) )
return false;
@@ -417,10 +420,21 @@ bool Convert( const medialibrary::IMediaGroup* input, vlc_ml_group_t& output )
output.i_id = input->id();
output.i_nb_total_media = input->nbTotalMedia();
+ output.i_nb_video = input->nbVideo();
+ output.i_nb_audio = input->nbAudio();
+ output.i_nb_unknown = input->nbUnknown();
+ output.i_nb_present_media = input->nbPresentMedia();
+ output.i_nb_present_video = input->nbPresentVideo();
+ output.i_nb_present_audio = input->nbPresentAudio();
+ output.i_nb_present_unknown = input->nbPresentUnknown();
+
+ output.i_nb_seen = input->nbSeen();
+ output.i_nb_present_seen = input->nbPresentSeen();
output.i_duration = input->duration();
output.i_creation_date = input->creationDate();
+ output.i_last_modification_date = input->lastModificationDate();
if( strdup_helper( input->name(), output.psz_name ) == false )
return false;
@@ -432,11 +446,20 @@ bool Convert( const medialibrary::IPlaylist* input, vlc_ml_playlist_t& output )
{
output.i_id = input->id();
- output.i_nb_media = input->nbMedia();
+ output.i_nb_media = input->nbMedia();
+ output.i_nb_video = input->nbVideo();
+ output.i_nb_audio = input->nbAudio();
+ output.i_nb_unknown = input->nbUnknown();
output.i_nb_present_media = input->nbPresentMedia();
+ output.i_nb_present_video = input->nbPresentVideo();
+ output.i_nb_present_audio = input->nbPresentAudio();
+ output.i_nb_present_unknown = input->nbPresentUnknown();
output.i_creation_date = input->creationDate();
+ output.i_duration = input->duration();
+ output.i_nb_duration_unknown = input->nbDurationUnknown();
+
output.b_is_read_only = input->isReadOnly();
if( !strdup_helper( input->name(), output.psz_name ) ||
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/23425b1a25702e168f450ce387db73478bb1ac67...a5eb80ea3dc0fd5e4b9e4814cde1a96cb1dcdbf1
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/23425b1a25702e168f450ce387db73478bb1ac67...a5eb80ea3dc0fd5e4b9e4814cde1a96cb1dcdbf1
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