Commit 65063bcb authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

media_controller: Add an album controller constructor

parent 6c8bf817
......@@ -30,6 +30,7 @@
#include "media_library_controller.h"
#include "media_library_controller_private.h"
#include "media/artist_item.h"
#include "media/album_item.h"
#include "ui/views/video_view.h"
#include "ui/views/audio_view.h"
......@@ -54,6 +55,13 @@ artist_controller_accept_item( const void* p_item )
return true;
}
static bool
album_controller_accept_item( const void* p_item )
{
(void)p_item;
return true;
}
media_library_controller*
video_controller_create(application* p_app, list_view* p_list_view)
{
......@@ -92,3 +100,16 @@ artist_controller_create(application* p_app, list_view* p_list_view)
p_ctrl->pf_accept_item = &artist_controller_accept_item;
return p_ctrl;
}
media_library_controller*
album_controller_create(application* p_app, list_view* p_list_view)
{
media_library_controller* p_ctrl = media_library_controller_create( p_app, p_list_view );
if ( p_ctrl == NULL )
return NULL;
p_ctrl->pf_media_library_get_content = (pf_media_library_get_content_cb)&media_library_get_albums;
p_ctrl->pf_item_duplicate = (pf_item_duplicate_cb)&album_item_copy;
p_ctrl->pf_item_compare = (pf_item_compare_cb)&album_item_identical;
p_ctrl->pf_accept_item = &album_controller_accept_item;
return p_ctrl;
}
......@@ -42,4 +42,7 @@ audio_controller_create(application* p_app, list_view* p_list_view);
media_library_controller*
artist_controller_create(application* p_app, list_view* p_list_view);
media_library_controller*
album_controller_create(application* p_app, list_view* p_list_view);
#endif // MEDIA_CONTROLLER_H_
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment