Skip to content
Snippets Groups Projects
Commit b561da29 authored by Prince Gupta's avatar Prince Gupta :speech_balloon: Committed by Hugo Beauzée-Luyssen
Browse files

qt: save genre covers in medialibrary

parent 3b1c3d72
No related branches found
No related tags found
1 merge request!845qt: save genre cover in medialibrary
......@@ -26,6 +26,15 @@ MLGenre::MLGenre(vlc_medialibrary_t* ml, const vlc_ml_genre_t *_data )
{
assert(_data);
for (int i = VLC_ML_THUMBNAIL_SMALL; i < VLC_ML_THUMBNAIL_SIZE_COUNT; ++i)
{
if (_data->thumbnails[i].psz_mrl)
{
setCover(_data->thumbnails[i].psz_mrl);
break;
}
}
}
QString MLGenre::getName() const
......
......@@ -180,6 +180,9 @@ void MLGenreModel::onCover()
genre->setGenerator(nullptr);
vlc_ml_media_set_genre_thumbnail(ml()->vlcMl(), item->getId().id
, qtu(genre->getCover()), VLC_ML_THUMBNAIL_SMALL);
thumbnailUpdated(index);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment