Note
This API has been available since API level 12.
This API has been available since API level 12.
Provides the functionalities that scan media files (audios, videos, images) from internal / external storage devices such as the usb devices and extracts the meta data.
For connected storage devices, detects media contents and extracts meta data. External services using API provided by the service can be informed when the status of connected devices or media contents are changed. Information of connected devices and media contents is also stored in DB via com.webos.mediadb.
Currently supported type of devices are as follows:
API level 12
Gets the available audio file list included in attached devices.
Note: If the uri is specified, the audio file list for specified uri is provided. Else the audio file list for all attached devices is provided.
Name | Required | Type | Description |
---|---|---|---|
uri | Optional | String | Indicates the uri of the device mounted on the target that contains the source path of the audio files. The format is given as: <protocol name>://<device uuid> Example: msc://D94A-BE4D |
subscribe | Optional | Boolean | Indicates if subscribed to get notifications. Possible values are:
Default: false Note: Notifications are not provided when an entry is removed from the list (physical devices are detached). In this case, the user is notified from other external service such as physical device manager. |
count | Optional | Number | Limits the number of entries in the returned audio file list. Default: 500 |
Name | Required | Type | Description |
---|---|---|---|
audioList | Optional | Object: audioList | Indicates the supported device types. |
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
errorCode | Optional | Number | The error code for the operation. Note: Currently, it returns 0 even when the returnValue is true and returns -1 if JSON parsing fails. |
errorText | Optional | String | Indicates the reason for the failure of the operation. Note: Currently, it returns "No Error" even when the returnValue is true. If JSON parsing fails, then errorText is updated accordingly. |
subscribed | Optional | Boolean | Indicates if subscribed to get notifications. Possible values are:
|
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
errorText | Optional | String | Indicates the reason for the failure of the operation. Note: Currently, it returns "No Error" even when the returnValue is true. If JSON parsing fails, then errorText is updated accordingly. |
errorCode | Optional | Number | The error code for the operation. Note: Currently, it returns 0 even when the returnValue is true and returns -1 if JSON parsing fails. |
audioList | Optional | Object: audioList | Specifies supported device types. |
subscribed | Optional | Boolean | Indicates if subscribed to get notifications. Possible values are:
|
Example: With uri
# luna-send -n 1 -f luna://com.webos.service.mediaindexer/getAudioList '{"uri":"msc://D94A-BE4D"}'
Response:
{
"errorCode": 0,
"returnValue": true,
"errorText": "No Error",
"audioList": {
"results": [
{
"last_modified_date": "Thu Jul 30 06:48:04 2020 GMT",
"duration": 10,
"file_path": "file:///tmp/usb/sdh/sdh1/tagtest.ID3v2.4.mp3",
"album": "Test Album",
"genre": "Classical",
"artist": "Test Artist",
"title": "Test Name",
"uri": "msc://D94A-BE4D/tmp/usb/sdh/sdh1/tagtest.ID3v2.4.mp3",
"file_size": 184861,
"thumbnail": "/media/.thumbnail/D94A-BE4D/9513454098549223.jpg"
}
],
"uri": "msc://D94A-BE4D",
"count": 1
}
}
Example: With subscription
# luna-send -i -f luna://com.webos.service.mediaindexer/getAudioList '{"subscribe":true}'
Response :
{
"subscribed": true,
"returnValue": true
}
Subscription response:
{
"errorCode": 0,
"returnValue": true,
"errorText": "No Error",
"audioList": [
{
"results": [
{
"last_modified_date": "Tue Nov 25 06:10:08 2014 GMT",
"duration": 260,
"dirty": false,
"file_path": "file:///tmp/usb/sdg/sdg1/MetaThumbnail/01_Jalsa.mp3",
"album": "Jalsa - (2008)",
"genre": "Telugu",
"artist": "Baba Sehgal, Rita",
"uri": "msc://D7FE-42B8/tmp/usb/sdg/sdg1/MetaThumbnail/01_Jalsa.mp3",
"title": "[iSongs.info] 01 - Jalsa",
"file_size": 4243260,
"thumbnail": "/media/.thumbnail/D7FE-42B8/8257472925753254.jpg"
},
{
"last_modified_date": "Mon Sep 14 05:53:28 2020 GMT",
"duration": 226,
"dirty": false,
"file_path": "file:///tmp/usb/sdg/sdg1/albumart/Miss_A.mp3",
"album": "TestAlbum",
"genre": "Telugu",
"artist": "Miss A",
"uri": "msc://D7FE-42B8/tmp/usb/sdg/sdg1/albumart/Miss_A.mp3",
"title": "Good Bye Baby",
"file_size": 5453302,
"thumbnail": "/media/.thumbnail/D7FE-42B8/1208322061333152.jpg"
}
],
"count": 2
}
]
}
Example: With subscription and count limitation
# luna-send -i -f luna://com.webos.service.mediaindexer/getAudioList '{
"subscribe":true,
"count":1
}'
Response:
{
"subscribed": true,
"returnValue": true
}
Subscription response 1:
{
"errorCode": 0,
"returnValue": true,
"errorText": "No Error",
"audioList": {
"results": [
{
"last_modified_date": "Tue Nov 25 06:10:08 2014 GMT",
"duration": 260,
"dirty": false,
"file_path": "file:///tmp/usb/sdg/sdg1/MetaThumbnail/01_Jalsa.mp3",
"album": "Jalsa - (2008)",
"genre": "Telugu",
"artist": "Baba Sehgal, Rita",
"uri": "msc://D7FE-42B8/tmp/usb/sdg/sdg1/MetaThumbnail/01_Jalsa.mp3",
"title": "[iSongs.info] 01 - Jalsa",
"file_size": 4243260,
"thumbnail": "/media/.thumbnail/D7FE-42B8/479067904926436.jpg"
}
],
"count": 1
}
}
Subscription response 2:
{
"errorCode": 0,
"returnValue": true,
"errorText": "No Error",
"audioList": {
"results": [
{
"last_modified_date": "Mon Sep 14 05:53:28 2020 GMT",
"duration": 226,
"dirty": false,
"file_path": "file:///tmp/usb/sdg/sdg1/albumart/Miss_A.mp3",
"album": "TestAlbum",
"genre": "Telugu",
"artist": "Miss A",
"uri": "msc://D7FE-42B8/tmp/usb/sdg/sdg1/albumart/Miss_A.mp3",
"title": "Good Bye Baby",
"file_size": 5453302,
"thumbnail": "/media/.thumbnail/D7FE-42B8/106457924970666.jpg"
}
],
"count": 1
}
}
Example: Without uri
# luna-send -n 1 -f luna://com.webos.service.mediaindexer/getAudioList '{}'
Response:
{
"errorCode": 0,
"returnValue": true,
"errorText": "No Error",
"audioList": {
"results": [
{
"last_modified_date": "Wed Jul 22 09:09:38 2020 GMT",
"duration": 348,
"file_path": "file:///tmp/usb/sdh/sdh1/Sample-OGG-File.ogg",
"album": "Ninja Tuna",
"genre": "Electronic",
"artist": "Mr. Scruff",
"title": "Kalimba",
"uri": "msc://B5E0-BBB2/tmp/usb/sdg/sdg1/Sample-OGG-File.ogg",
"file_size": 6984260,
"thumbnail": ""
},
{
"last_modified_date": "Thu Jul 30 06:48:04 2020 GMT",
"duration": 10,
"file_path": "file:///tmp/usb/sdh/sdh1/tagtest.ID3v2.4.mp3",
"album": "Test Album",
"genre": "Classical",
"artist": "Test Artist",
"title": "Test Name",
"uri": "msc://D94A-BE4D/tmp/usb/sdh/sdh1/tagtest.ID3v2.4.mp3",
"file_size": 184861,
"thumbnail": "/media/.thumbnail/D94A-BE4D/9513454098549223.jpg"
}
],
"count": 2
}
}
API level 12
Gets the detailed meta data information of the specified uri for the given audio file.
Name | Required | Type | Description |
---|---|---|---|
uri | Required | String | Indicates the uri of the audio file. Example: msc://D94A-BE4D/tmp/usb/sdg/sdg1/SampleAudio.mp3 |
Name | Required | Type | Description |
---|---|---|---|
metadata | Optional | Object array: AudioMetadata | Indicates the meta data information of specified audio file. |
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
errorCode | Optional | Number | The error code for the operation. Note: Currently, it returns 0 even when the returnValue is true and returns -1 if JSON parsing fails. |
errorText | Optional | String | Indicates the reason for the failure of the operation. Note: Currently, it returns "No Error" even when the returnValue is true. If JSON parsing fails, then errorText is updated accordingly. |
Example: With uri
# luna://com.webos.service.mediaindexer/getAudioMetadata '{"uri":"msc://D94A-BE4D/tmp/usb/sdh/sdh1/tagtest.ID3v2.4.mp3"}'
Response:
{
"errorCode": 0,
"returnValue": true,
"metadata": {
"sample_rate": 44100,
"file_path": "file:///tmp/usb/sdh/sdh1/tagtest.ID3v2.4.mp3",
"track": "3/4",
"date_of_creation": "2008-12-29",
"genre": "Classical",
"duration": 10,
"last_modified_date": "Thu Jul 30 06:48:04 2020 GMT",
"uri": "msc://D94A-BE4D/tmp/usb/sdh/sdh1/tagtest.ID3v2.4.mp3",
"album": "Test Album",
"type": "audio",
"thumbnail": "/media/.thumbnail/D94A-BE4D/4470986424276816.jpg",
"bit_rate": 110,
"hash": "13605171757709551616",
"title": "Test Name",
"dirty": false,
"artist": "Test Artist",
"mime": "audio/mpeg",
"total_tracks": "",
"file_size": 184861,
"channels": 2,
"album_artist": "Test Album Artist",
"bit_per_sample": "",
"lyric": ""
},
"errorText": "No Error"
}
API level 12
Gets the list of all the attached storage devices.
Note: The list can contain devices that are currently attached or the devices attached in the past.
Name | Required | Type | Description |
---|---|---|---|
subscribe | Required | Boolean | Indicates if subscribed to get the notifications. Possible values are:
Default: false |
Name | Required | Type | Description |
---|---|---|---|
pluginList | Required | Object array: pluginList | Indicates the supported device types. |
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
errorCode | Optional | Number | The error code for the operation. |
errorText | Optional | String | Indicates the reason for the failure of the operation. |
subscribed | Optional | Boolean | Indicates if subscribed to get notifications. Possible values are:
|
Name | Required | Type | Description |
---|---|---|---|
pluginList | Required | Object array: pluginList | Indicates the supported device types. |
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
errorCode | Optional | Number | The error code for the operation. |
errorText | Optional | String | Indicates the reason for the failure of the operation. |
subscribed | Optional | Boolean | Indicates if subscribed to get notifications. Possible values are:
|
Example: With subscription
# luna-send -n 2 -f luna://com.webos.service.mediaindexer/getDeviceList '{"subscribe":true}'
Response:
{
"subscribed": true,
"returnValue": true
}
Subscription response:
{
"returnValue": true,
"pluginList": [
{
"uri": "msc",
"deviceList": [
{
"videoCount": 14,
"available": true,
"state": "idle",
"audioCount": 17,
"name": "SanDisk 3.2Gen1",
"description": "SanDisk 3.2Gen1",
"imageCount": 6,
"uri": "msc://4CA3-8283"
}
],
"active": true
},
{
"uri": "storage",
"deviceList": [
{
"videoCount": 0,
"available": true,
"state": "idle",
"audioCount": 0,
"name": "Media",
"description": "Local Media Storage",
"imageCount": 0,
"uri": "storage:///media/multimedia"
}
],
"active": true
}
]
}
API level 12
Gets all the available image file list included in the attached devices.
Note: If the uri is specified, the image file list for specified uri is provided. Else the image file list for all attached devices is provided.
Name | Required | Type | Description |
---|---|---|---|
uri | Optional | String | Indicates the uri of the device mounted on the target that contains the source path of the image files. Format: <protocol name>://<device uuid>. Example: msc://D94A-BE4D |
subscribe | Optional | Boolean | Indicates if subscribed to get notifications. Possible values are:
Default: false Note: Notifications are not provided when an entry is removed from the list (physical devices are detached). In this case, the user is notified from other external service such as physical device manager. |
count | Optional | Number | Limits the number of entries in the returned image file list. Default: 500 |
Name | Required | Type | Description |
---|---|---|---|
imageList | Optional | Object: imageList | Specifies the supported device types. See imageList for details. |
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
errorCode | Optional | Number | The error code for the operation. Note: Currently, it returns 0 even when the returnValue is true and returns -1 if JSON parsing fails. |
errorText | Optional | String | Indicates the reason for the failure of the operation. Note: Currently, it returns "No Error" even when the returnValue is true. If JSON parsing fails, then errorText is updated accordingly. |
subscribed | Optional | Boolean | Indicates if subscribed to get notifications. Possible values are:
|
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
subscribed | Optional | Boolean | Indicates if subscribed to get notifications. Possible values are:
|
errorText | Optional | String | Indicates the reason for the failure of the operation. Note: Currently, it returns "No Error" even when the returnValue is true. If JSON parsing fails, then errorText is updated accordingly. |
errorCode | Optional | Number | The error code for the operation. Note: Currently, it returns 0 even when the returnValue is true and returns -1 if JSON parsing fails. |
imageList | Optional | Object: imageList | Indicates the supported device types. See imageList for details. |
Example: Without uri
# luna-send -n 1 -f luna://com.webos.service.mediaindexer/getImageList '{}'
Response:
{
"errorCode": 0,
"returnValue": true,
"errorText": "No Error",
"imageList": {
"results": [
{
"width": 1024,
"last_modified_date": "Fri Aug 14 03:54:08 2020 GMT",
"uri": "msc://B5E0-BBB2/tmp/usb/sdg/sdg1/image/SampleImage1.jpg",
"title": "SampleImage1",
"file_size": 197377,
"height": 768,
"file_path": "file:///tmp/usb/sdg/sdg1/image/SampleImage1.jpg"
},
{
"width": 1024,
"last_modified_date": "Wed Jul 22 09:04:16 2020 GMT",
"uri": "msc://D94A-BE4D/tmp/usb/sdh/sdh1/SampleImage2.jpg",
"title": "SampleImage2",
"file_size": 199429,
"height": 768,
"file_path": "file:///tmp/usb/sdh/sdh1/SampleImage2.jpg"
}
],
"count": 2
}
}
Example: With uri
# luna-send -n 1 -f luna://com.webos.service.mediaindexer/getImageList '{"uri":"msc://D94A-BE4D"}'
Response:
{
"errorCode": 0,
"returnValue": true,
"errorText": "No Error",
"imageList": {
"results": [
{
"width": 1024,
"last_modified_date": "Wed Jul 22 09:04:16 2020 GMT",
"uri": "msc://D94A-BE4D/tmp/usb/sdh/sdh1/SampleImage2.jpg",
"title": "SampleImage2",
"file_size": 199429,
"height": 768,
"file_path": "file:///tmp/usb/sdh/sdh1/SampleImage2.jpg"
}
],
"uri": "msc://D94A-BE4D",
"count": 1
}
}
Example: With subscription
# luna-send -i -f luna://com.webos.service.mediaindexer/getImageList '{"subscribe":true}'
Response:
{
"subscribed": true,
"returnValue": true
}
Subscription response:
{
"errorCode": 0,
"returnValue": true,
"errorText": "No Error",
"imageList": [
{
"results": [
{
"width": 350,
"last_modified_date": "Thu Jul 14 07:05:32 2016 GMT",
"dirty": false,
"file_path": "file:///tmp/usb/sdg/sdg1/scan1/Apink_ Promise U.jpg.jpg",
"height": 196,
"file_size": 56228,
"title": "Apink_ Promise U.jpg",
"uri": "msc://D7FE-42B8/tmp/usb/sdg/sdg1/scan1/Apink_ Promise U.jpg.jpg"
},
{
"width": 3092,
"last_modified_date": "Mon Sep 14 02:06:24 2020 GMT",
"dirty": false,
"file_path": "file:///tmp/usb/sdg/sdg1/MetaThumbnail/thorsmork.jpg",
"height": 1616,
"file_size": 1060326,
"title": "thorsmork",
"uri": "msc://D7FE-42B8/tmp/usb/sdg/sdg1/MetaThumbnail/thorsmork.jpg"
}
],
"count": 2
}
]
}
Example: With subscription and count limitation
# luna-send -i -f luna://com.webos.service.mediaindexer/getImageList '{
"subscribe":true,
"count":1
}'
Response :
{
"subscribed": true,
"returnValue": true
}
Subscription response:
{
"errorCode": 0,
"returnValue": true,
"errorText": "No Error",
"imageList": {
"results": [
{
"width": 350,
"last_modified_date": "Thu Jul 14 07:05:32 2016 GMT",
"dirty": false,
"file_path": "file:///tmp/usb/sdg/sdg1/scan1/Apink_ Promise U.jpg.jpg",
"height": 196,
"file_size": 56228,
"title": "Apink_ Promise U.jpg",
"uri": "msc://D7FE-42B8/tmp/usb/sdg/sdg1/scan1/Apink_ Promise U.jpg.jpg"
}
],
"count": 1
}
}
API level 12
Gets the detailed meta data information of specified uri of the image file.
Name | Required | Type | Description |
---|---|---|---|
uri | Required | String | Indicates the uri of the audio file. Example: msc://D94A-BE4D/tmp/usb/sdg/sdg1/SampleImage.jpg |
Name | Required | Type | Description |
---|---|---|---|
metadata | Optional | Object array: imageList | Indicates the metadata information of specified audio file. |
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
errorCode | Optional | Number | The error code for the operation. Note: Currently, it returns 0 even when the returnValue is true and returns -1 if JSON parsing fails. |
errorText | Optional | String | Indicates the reason for the failure of the operation. Note: Currently, it returns "No Error" even when the returnValue is true. If JSON parsing fails, then errorText is updated accordingly. |
Example: With uri
# luna-send -n 1 -f luna://com.webos.service.mediaindexer/getImageMetadata '{"uri":"msc://D94A-BE4D/tmp/usb/sdh/sdh1/SampleImage2.jpg"}'
Response:
{
"errorCode": 0,
"returnValue": true,
"metadata": {
"date_of_creation": "",
"geo_location_city": "",
"last_modified_date": "Wed Jul 22 09:04:16 2020 GMT",
"uri": "msc://D94A-BE4D/tmp/usb/sdh/sdh1/SampleImage2.jpg",
"height": 768,
"type": "image",
"hash": "13604488729709551616",
"title": "SampleImage2",
"width": 1024,
"dirty": false,
"mime": "image/jpeg",
"file_path": "file:///tmp/usb/sdh/sdh1/SampleImage2.jpg",
"geo_location_latitude": "",
"geo_location_longitude": "",
"geo_location_country": "",
"file_size": 199429
},
"errorText": "No Error"
}
API level 12
Enables the external services or applications to acquire, access permission of the DB managed by the media indexer service.
Name | Required | Type | Description |
---|---|---|---|
serviceName | Required | String | Indicates the name of the external services or the applications to access the DB of the media indexer service. |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
|
errorCode | Optional | Number | The error code for the operation. |
errorText | Optional | String | Indicates the reason for the failure of the operation. |
Example: With serviceName
# luna-send -n 1 -f luna://com.webos.service.mediaindexer/getMediaDbPermission '{"serviceName":"com.webos.mediaindexer.app.qml"}'
Response:
{
"returnValue":true
}
Example: Without service name
# luna-send -n 1 -f luna://com.webos.service.mediaindexer/getMediaDbPermission '{}'
Response:
{
"errorCode":-1,
"returnValue":false,
"errorText":"serviceName field is mandatory input"
}
API level 24
Requests to retrieve the plugin from the plugin factory and to then activate the plugin.
Name | Required | Type | Description |
---|---|---|---|
uri | Optional | String | URI of the plugin to be retrieved and activated. |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
errorCode | Optional | Number | The error code for the failed operation. |
errorText | Optional | String | Indicates the reason for the failure of the operation. |
Error Code | Error Text | Error Description |
---|---|---|
-1 | Method "getPlugin" for category "/" was not handled | Method was not executed due to invalid input. |
Example scenario
# luna-send -n 1 -f luna://com.webos.service.mediaindexer/getPlugin '{"uri": "mtp"}'
Response:
{
"returnValue": true
}
API level 24
Gets a list of available plugins.
None
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of the operation. Always returns true. |
pluginList | Optional | Object array: pluginList | Contains list of all installed plugins. |
Example scenario
# luna-send -n 1 -f luna://com.webos.service.mediaindexer/getPluginList '{}'
Response:
{
"returnValue":true,
"pluginList":[
{
"uri":"mtp"
},
{
"uri":"upnp"
},
{
"uri":"msc"
},
{
"uri":"storage"
}
]
}
API level 12
Gets the available video files list included in the attached devices.
Note: If the uri is specified, the video file list for specified uri is provided. Else the video file list for all attached devices is provided.
Name | Required | Type | Description |
---|---|---|---|
uri | Optional | String | Specifies uri of device mounted on target that provided video files belongs to. Format: <protocol name>://<device uuid>. Example: msc://D94A-BE4D |
subscribe | Optional | Boolean | Indicates if subscribed to get notifications. Possible values are:
Default: false Note: Notifications are not provided when an entry is removed from the list (physical devices are detached). In this case, the user is notified from other external service such as physical device manager. |
count | Optional | Number | Limits the number of entries in the returned video file list. Default: 500 |
Name | Required | Type | Description |
---|---|---|---|
videoList | Optional | Object: videoList | Indicates the supported device types. |
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
errorCode | Optional | Number | The error code for the operation. Note: Currently, it returns 0 even when the returnValue is true and returns -1 if JSON parsing fails. |
errorText | Optional | String | Indicates the reason for the failure of the operation. Note: Currently, it returns "No Error" even when the returnValue is true. If JSON parsing fails, then errorText is updated accordingly. |
subscribed | Optional | Boolean | Indicates if subscribed to get notifications. Possible values are:
|
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
subscribed | Optional | Boolean | Indicates if subscribed to get notifications. Possible values are:
|
errorText | Optional | String | Indicates the reason for the failure of the operation. Note: Currently, it returns "No Error" even when the returnValue is true. If JSON parsing fails, then errorText is updated accordingly. |
errorCode | Optional | Number | The error code for the operation. Note: Currently, it returns 0 even when the returnValue is true and returns -1 if JSON parsing fails. |
videoList | Optional | Object: videoList | Indicates the supported device types. |
Example: Without uri
# luna-send -n 1 -f luna://com.webos.service.mediaindexer/getVideoList '{}'
Response:
{
"errorCode": 0,
"returnValue": true,
"videoList": {
"results": [
{
"width": 1920,
"duration": 205,
"file_path": "file:///tmp/usb/sdg/sdg1/video/SampleVideofiles1.mp4",
"last_modified_date": "Fri Aug 14 03:55:22 2020 GMT",
"thumbnail": "/media/.thumbnail/B5E0-BBB2/1716759322466815.jpg",
"height": 1080,
"file_size": 264881271,
"uri": "msc://B5E0-BBB2/tmp/usb/sdg/sdg1/video/SampleVideofiles1.mp4",
"title": "SampleVideofiles1"
},
{
"width": 1920,
"duration": 209,
"file_path": "file:///tmp/usb/sdh/sdh1/SampleVideofiles2.mp4",
"last_modified_date": "Wed Jul 22 09:07:16 2020 GMT",
"thumbnail": "/media/.thumbnail/D94A-BE4D/3810749630515133.jpg",
"height": 1080,
"file_size": 268264916,
"uri": "msc://D94A-BE4D/tmp/usb/sdh/sdh1/SampleVideofiles2.mp4",
"title": "SampleVideofiles2"
}
],
"count": 2
},
"errorText": "No Error"
}
Example: With uri
# luna-send -n 1 -f luna://com.webos.service.mediaindexer/getVideoList '{"uri":"msc://D94A-BE4D"}'
Response:
{
"errorCode": 0,
"returnValue": true,
"videoList": {
"results": [
{
"width": 1920,
"duration": 209,
"file_path": "file:///tmp/usb/sdh/sdh1/SampleVideofiles2.mp4",
"last_modified_date": "Wed Jul 22 09:07:16 2020 GMT",
"thumbnail": "/media/.thumbnail/D94A-BE4D/1176055898542105.jpg",
"height": 1080,
"file_size": 268264916,
"uri": "msc://D94A-BE4D/tmp/usb/sdh/sdh1/SampleVideofiles2.mp4",
"title": "SampleVideofiles2"
}
],
"uri": "msc://D94A-BE4D",
"count": 1
},
"errorText": "No Error"
}
Example: With subscription
# luna-send -i -f luna://com.webos.service.mediaindexer/getVideoList '{"subscribe":true}'
Response :
{
"subscribed": true,
"returnValue": true
}
Subscription response:
{
"errorCode": 0,
"returnValue": true,
"videoList": [
{
"results": [
{
"last_modified_date": "Mon Nov 5 23:48:20 2018 GMT",
"duration": 9,
"dirty": false,
"file_path": "file:///tmp/usb/sdg/sdg1/MetaThumbnail/SampleVideo_360x240_1mb.mkv",
"thumbnail": "/media/.thumbnail/D7FE-42B8/1268526786254962.jpg",
"height": 240,
"file_size": 1055721,
"title": "SampleVideo_360x240_1mb",
"uri": "msc://D7FE-42B8/tmp/usb/sdg/sdg1/MetaThumbnail/SampleVideo_360x240_1mb.mkv",
"width": 320
},
{
"last_modified_date": "Mon Nov 5 23:48:20 2018 GMT",
"duration": 9,
"dirty": false,
"file_path": "file:///tmp/usb/sdg/sdg1/scan1/SampleVideo_360x240_1mb.mkv",
"thumbnail": "/media/.thumbnail/D7FE-42B8/1123462817394724.jpg",
"height": 240,
"file_size": 1055721,
"title": "SampleVideo_360x240_1mb",
"uri": "msc://D7FE-42B8/tmp/usb/sdg/sdg1/scan1/SampleVideo_360x240_1mb.mkv",
"width": 320
}
],
"count": 2
}
],
"errorText": "No Error"
}
Example: With subscription and count limitation
# luna-send -i -f luna://com.webos.service.mediaindexer/getVideoList '{
"subscribe":true,
"count":1
}'
Response :
{
"subscribed": true,
"returnValue": true
}
Subscription response:
{
"errorCode": 0,
"returnValue": true,
"videoList": {
"results": [
{
"last_modified_date": "Mon Nov 5 23:48:20 2018 GMT",
"duration": 9,
"dirty": false,
"file_path": "file:///tmp/usb/sdg/sdg1/MetaThumbnail/SampleVideo_360x240_1mb.mkv",
"thumbnail": "/media/.thumbnail/D7FE-42B8/685728599232055.jpg",
"height": 240,
"file_size": 1055721,
"title": "SampleVideo_360x240_1mb",
"uri": "msc://D7FE-42B8/tmp/usb/sdg/sdg1/MetaThumbnail/SampleVideo_360x240_1mb.mkv",
"width": 320
}
],
"count": 1
},
"errorText": "No Error"
}
Subscription response 2:
{
"errorCode": 0,
"returnValue": true,
"videoList": {
"results": [
{
"last_modified_date": "Mon Nov 5 23:48:20 2018 GMT",
"duration": 9,
"dirty": false,
"file_path": "file:///tmp/usb/sdg/sdg1/scan1/SampleVideo_360x240_1mb.mkv",
"thumbnail": "/media/.thumbnail/D7FE-42B8/677091961220339.jpg",
"height": 240,
"file_size": 1055721,
"title": "SampleVideo_360x240_1mb",
"uri": "msc://D7FE-42B8/tmp/usb/sdg/sdg1/scan1/SampleVideo_360x240_1mb.mkv",
"width": 320
}
],
"count": 1
},
"errorText": "No Error"
}
API level 12
Gets the detailed meta data information for the specified uri of the video file.
Name | Required | Type | Description |
---|---|---|---|
uri | Required | String | Indicates the uri of the video file. Example: msc://D94A-BE4D/tmp/usb/sdg/sdg1/SampleVideo.mp4 |
Name | Required | Type | Description |
---|---|---|---|
metadata | Optional | Object array: VideoMetadata | Indicates the meta data information of specified video file. |
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
errorCode | Optional | Number | The error code for the operation. Note: Currently, it returns 0 even when the returnValue is true and returns -1 if JSON parsing fails. |
errorText | Optional | String | Indicates the reason for the failure of the operation. Note: Currently, it returns "No Error" even when the returnValue is true. If JSON parsing fails, then errorText is updated accordingly. |
Example: With uri
# luna-send -n 1 -f luna://com.webos.service.mediaindexer/getVideoMetadata '{"uri":"msc://D94A-BE4D/tmp/usb/sdh/sdh1/SampleVideofiles2.mp4"}'
Response:
{
"errorCode": 0,
"returnValue": true,
"metadata": {
"video_codec": "H.264 / AVC",
"date_of_creation": "",
"last_modified_date": "Wed Jul 22 09:07:44 2020 GMT",
"uri": "msc://D94A-BE4D/tmp/usb/sdh/sdh1/SampleVideofiles2.mp4",
"height": 1080,
"type": "video",
"thumbnail": "/media/.thumbnail/D94A-BE4D/1740291740485930.jpg",
"hash": "13604488937709551616",
"title": "SampleVideofiles2.mp4",
"width": 1920,
"dirty": false,
"frame_rate": "24000/1001",
"mime": "video/mp4",
"audio_codec": "MPEG-4 AAC audio",
"file_size": 264881271,
"file_path": "file:///tmp/usb/sdh/sdh1/SampleVideofiles2.mp4",
"duration": 205
},
"errorText": "No Error"
}
API level 24
Requests to add the plugin to the plugin factory.
Name | Required | Type | Description |
---|---|---|---|
uri | Required | String | URI of the plugin to be added. |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
errorCode | Optional | Number | The error code for the failed operation. |
errorText | Optional | String | Indicates the reason for the failure of the operation. |
Error Code | Error Text | Error Description |
---|---|---|
-1 | Method "putPlugin" for category "/" was not handled | Method was not executed due to invalid input. |
Example scenario
# luna-send -n 1 -f luna://com.webos.service.mediaindexer/putPlugin '{"uri": "mtp"}'
Response:
{
"returnValue": true
}
API level 24
Requests deletion of media item from media DB connector.
Name | Required | Type | Description |
---|---|---|---|
uri | Required | String | Playback URI for the given media item. |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
errorCode | Optional | Number | The error code for the failed operation. |
errorText | Optional | String | Indicates the reason for the failure of the operation. |
count | Optional | Number | Provides the list of medial files which are deleted from database. |
Error Code | Error Text | Error Description |
---|---|---|
-3970 | kind not registered: '' | If kind is not registered, this error will be returned. |
-1 | Method "requestDelete" for category "/" was not handled | Method was not executed due to invalid input. |
Example scenario
# luna-send -n 1 -f luna://com.webos.service.mediaindexer/requestDelete '{"uri": "/home/root/resolution_4.mp4"}'
Response:
{
"returnValue": true,
"count": 0
}
Example scenario
# luna-send -n 1 -f luna://com.webos.service.mediaindexer/requestDelete '{"uri": "/home/root/"}'
Response:
{
"errorCode": -3970,
"errorText": "kind not registered: ''",
"returnValue": false
}
API level 24
Scans device for media item.
Name | Required | Type | Description |
---|---|---|---|
path | Required | String | Playback URI for the given media item. |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
errorCode | Required | Number | The error code for the failed operation. |
errorText | Required | String | Indicates the reason for the failure of the operation. |
Error Code | Error Text | Error Description |
---|---|---|
-1 | Scan Failed | String in case of scan failure, this error will be returned. |
-1 | Method "requestMediaScan" for category "/" was not handled | Method was not executed due to invalid input. |
0 | No error | Operation is successful. |
Example scenario
# luna-send -n 1 -f luna://com.webos.service.mediaindexer/requestMediaScan '{"path": "/media"}'
Response:
{
"errorCode": 0,
"returnValue": true,
"errorText": "No Error"
}
API level 24
Requests to check plugins that are available in the known devices databases and then enables the device detection to notify the observer.
Name | Required | Type | Description |
---|---|---|---|
uri | Optional | String | URI of the plugin. |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
errorCode | Optional | Number | The error code for the failed operation. |
errorText | Optional | String | Indicates the reason for the failure of the operation. |
Error Code | Error Text | Error Description |
---|---|---|
-1 | Method "runDetect" for category "/" was not handled | Method was not executed due to invalid input. |
Example scenario
# luna-send -n 1 -f luna://com.webos.service.mediaindexer/runDetect '{"uri": "msc"}'
Response:
{
"returnValue": true
}
API level 24
Requests not to detect the plugin in database for the known device and do not enable the device detection to notify the observer.
Name | Required | Type | Description |
---|---|---|---|
uri | Optional | String | URI of the plugin. |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
errorCode | Optional | Number | The error code for the failed operation. |
errorText | Optional | String | Indicates the reason for the failure of the operation. |
Error Code | Error Text | Error Description |
---|---|---|
-1 | Method "stopDetect" for category "/" was not handled | Method was not executed due to invalid input. |
Example scenario
# luna-send -n 1 -f luna://com.webos.service.mediaindexer/stopDetect '{"uri": "mtp"}'
Response:
{
"returnValue": true
}
Contains the detailed information about the audio files.
Name | Required | Type | Description |
---|---|---|---|
uri | Optional | String | Indicates the uri of the audio file. |
last_modified_date | Optional | String | Contains the last file modification date information. |
file_size | Optional | Number | Indicates the file size in bytes. |
file_path | Optional | String | Indicates the accessible uri of the audio file (for playback usage). |
title | Optional | String | Indicates the title information of the audio file. |
duration | Optional | Number | Indicates the duration of the given video file (unit : second). |
thumbnail | Optional | String | Contains the thumbnail path information of the corresponding audio file. |
genre | Optional | String | Indicates the genre of the specified audio file. |
album | Optional | String | Contains the album information of the specified audio file. |
artist | Optional | String | Indicates the artist information for the specified audio file. |
Contains the information about the AudioList, and also provides detailed information that are not included in AudioList.
Name | Required | Type | Description |
---|---|---|---|
uri | Optional | String | Indicates the uri of the audio file. |
type | Optional | String | Indicates the type of the file. Possible values are :
|
last_modified_date | Optional | String | Contains the last file modification date information. |
file_size | Optional | Number | Indicates the file size in bytes. |
file_path | Optional | String | Indicates the accessible uri of the audio file (for playback usage). |
title | Optional | String | Indicates the title information of audio file. |
duration | Optional | Number | Indicates the duration of the given video file (unit : second). |
thumbnail | Optional | String | Contains the thumbnail path information of the corresponding audio file. |
mime | Optional | String | Indicates the mime type information of the audio file. |
date_of_creation | Optional | String | Contains the information of the recording date for the specified audio file. |
genre | Optional | String | Indicates the genre of the specified audio file. |
album | Optional | String | Contains the album information for the specific audio file. |
artist | Optional | String | Contains the artist information for the specified audio file. |
album_artist | Optional | String | Contains the album artist information for the specified audio file. Note: Distinct from artists for the tracks that constitute a release. Example: Various Artists |
track | Optional | String | Contains the number information for the specified audio file. |
total_track | Optional | String | Indicates the total tracks of a release that belong to the specified audio file. |
sample_rate | Optional | Number | Contains the sampling rate information of the audio file. |
bit_per_sample | Optional | String | Indicates the number of bits of information in each sample for the specified audio file. |
channel | Optional | Number | Contains the information of the number of channels for a specified audio file. |
lyric | Optional | String | Contains the lyric information for the specified audio file. |
bit_rate | Optional | Number | Contains the bitrate information for the specified audio file. |
hash | Optional | String | Indicates the value that specifies if an audio file has been modified or not. Note: The property is intended for internal usage only. |
dirty | Optional | Boolean | Indicates if the device includes audio files. Possible values are:
Note: The property is intended for internal usage only. |
Detailed information about video files.
Name | Required | Type | Description |
---|---|---|---|
uri | Optional | String | Indicates the uri of the image file. |
last_modified_date | Optional | String | Contains the last file modification date information. |
file_size | Optional | Number | Indicates the file size in bytes. |
file_path | Optional | String | Indicates the absolute file path of the image file. |
title | Optional | String | Indicates the title of the given image file. |
width | Optional | Number | Indicates the width of the given image. |
height | Optional | Number | Indicates the height of the given image. |
Contains the information in the ImageList, and also provides detailed information that are not included in ImageList.
Name | Required | Type | Description |
---|---|---|---|
uri | Optional | String | Indicates the uri of the image file. |
type | Optional | String | Indicates the type of the file. Possible values are :
|
mime | Optional | String | Indicates the mime type of the image file. |
last_modified_date | Optional | String | Contains the last file modification date information. |
date_of_creation | Optional | String | Indicates the date of creation for the given image file. |
file_size | Optional | Number | Indicates the file size in bytes. |
file_path | Optional | String | Indicates the absolute file path of the image file. |
title | Optional | String | Indicates the title of the given image file. |
width | Optional | Number | Indicates the width of the given image. |
height | Optional | String | Indicates the height of the given image. |
geo_location_longtitude | Optional | String | Specifies the longitude information of the given image. |
geo_location_latitude | Optional | String | Specifies the latitude information of the given image. |
geo_location_country | Optional | String | Specifies the country information of the given image. |
geo_location_city | Optional | String | Specifies the city information of the image. |
hash | Optional | String | Indicates the value that specifies if an audio file has been modified or not. Note: The property is intended for internal usage only. |
dirty | Optional | Boolean | Indicates if the device includes audio files. Possible values are:
Note: The property is intended for internal usage only. |
Contains the detailed information about the video files.
Name | Required | Type | Description |
---|---|---|---|
uri | Optional | String | Indicates the uri of the given video file. |
last_modified_date | Optional | String | Contains the last file modification date information. |
file_size | Optional | Number | Indicates the file size in bytes. |
file_path | Optional | String | Indicates the accessible uri of the video file (for playback usage). |
title | Optional | String | Indicates the title of the given video file. |
duration | Optional | Number | Indicates the duration of the given video file (unit : second). |
thumbnail | Optional | String | Contains the thumbnail path information of the corresponding video file. |
width | Optional | Number | Indicates the width of the given video file. |
height | Optional | Number | Indicates the height of the given video file. |
Contains the information about the VideoList, provides information about the video files that are not included in the VideoList.
Name | Required | Type | Description |
---|---|---|---|
uri | Optional | String | Indicates the uri of the given video file. |
title | Optional | String | Indicates the title of the given video file. |
type | Optional | String | Indicates the type of the file. Possible values are :
|
last_modified_date | Optional | String | Contains the last file modification date information. |
file_size | Optional | Number | Indicates the file size in bytes. |
file_path | Optional | String | Indicates the accessible uri of the video file (for playback usage). |
duration | Optional | Number | Indicates the duration information of the video file (unit : second). |
thumbnail | Optional | String | Contains the thumbnail path information of the corresponding video file. |
mime | Optional | String | Indicates the mime type information of the given video file. |
date_of_creation | Optional | String | Indicates the date of creation for the given image file. |
width | Optional | Number | Indicates the width of the given video file. |
height | Optional | Number | Indicates the height of the given video file. |
frame_rate | Optional | Number | Indicates the frame rate information of the given video file. |
video_codec | Optional | String | Indicates the video codec information. |
audio_codec | Optional | String | Indicates the audio codec information. |
hash | Optional | String | Indicates the value that specifies if an audio file has been modified or not. Note: The property is intended for internal usage only. |
dirty | Optional | Boolean | Indicates if the device includes audio files. Possible values are:
Note: The property is intended for internal usage only. |
Includes information about the uri of the devices, total number of audio files inside and requested result of audio files.
Name | Required | Type | Description |
---|---|---|---|
uri | Optional | String | Indicates the uri of the device mounted on the target. |
count | Optional | Number | Indicates the number of audio files included in the specified device. |
results | Optional | Object array: AudioList | Contains the information of each audio file provided as an array format. |
Provides the detailed information about the specific device connected to the media indexer service.
Name | Required | Type | Description |
---|---|---|---|
uri | Optional | String | Indicates the uri of the device mounted on the target. |
name | Optional | String | Indicates the human-readable device name. |
available | Optional | Boolean | Indicates if the device currently available. Possible values are:
|
icon | Optional | String | Indicates the location of a device identification icon. |
imageCount | Optional | Number | Indicates the number of image files stored in the connected devices. |
videoCount | Optional | Number | Indicates the number of video files stored in the connected devices. |
audioCount | Optional | Number | Indicates the number of audio files stored in the connected devices. |
description | Optional | String | Contains a human-readable device description. |
state | Optional | String | Indicates the state of the connected device
|
Includes information about uri of the devices, total number of image files inside and requested result of the image files.
Name | Required | Type | Description |
---|---|---|---|
uri | Optional | String | Indicates the uri of the device mounted on the target. |
count | Optional | Number | Indicates the number of audio files included in the specified device. |
results | Optional | Object array: ImageList | Contains the information of each audio file provided in an array format. |
Defines the supported device types by the media indexer service.
Name | Required | Type | Description |
---|---|---|---|
uri | Optional | String | Specifies the supported device type. Possible values are:
|
active | Optional | Boolean | Indicates if the state of device can be changed. Possible values are:
|
deviceList | Optional | Object: deviceList | Contains the detailed information about currently/previously attached devices. |
Includes information about the uri of devices, total number of video files inside and requested result of the video files.
Name | Required | Type | Description |
---|---|---|---|
uri | Optional | String | Indicates the uri of the device mounted on the target. |
count | Optional | Number | Indicates the number of video files included in the specified device. |
results | Optional | String | Contains the information of each audio file provided in an array format. |
Contents