diff options
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | binding/media-manager.c | 15 |
2 files changed, 7 insertions, 10 deletions
@@ -28,6 +28,8 @@ with the following fields. | genre | genre type for media entry | | type | media entry data type *(e.g audio, video)* | +If no media is present, the an empty array will be returned. + ## Events | Name | Description | diff --git a/binding/media-manager.c b/binding/media-manager.c index 8e1ac69..310f581 100644 --- a/binding/media-manager.c +++ b/binding/media-manager.c @@ -393,7 +393,7 @@ gint media_lists_get(MediaDevice_t* mdev, gchar **error) MediaList_t *mlist = NULL; ScanFilter_t *filters = NULL; gint ret = -1; - gint scaned_media = 0; + gint scanned_media = 0; gint i = 0; if(!mdev) @@ -418,16 +418,11 @@ gint media_lists_get(MediaDevice_t* mdev, gchar **error) free(mdev->lists[i]); mdev->lists[i] = NULL; } else { - scaned_media += ret; + scanned_media += ret; } } } - if(scaned_media == 0) - { - *error = g_strdup("No media found!"); - return -1; - } - LOGD("\n\tscanned media: %d\n",scaned_media); - return scaned_media; -}
\ No newline at end of file + LOGD("\n\tscanned media: %d\n",scanned_media); + return scanned_media; +} |