V3 Operation for Songs or Folders
Flutter Example:
/// Operation for songs or folders event
setMusicOperate(
evtBase: _VBusEvtBase.base_app_set,
evtType: _VBusEvtType.func_v3_operate_ble_music),
/// Operation for songs or folders
libManager.send(evt: CmdEvtType.setMusicOperate, json: jsonEncode(json));
JSON Fields Sent by the App:
Field Name | Field Type | Field Description |
---|---|---|
version | int | Protocol library version number |
music_operate | int | Music operation 0: Invalid operation 1: Delete music 2: Add music |
folder_operate | int | Folder (playlist) operation 0: Invalid operation 1: Delete folder 2: Add folder 3: Modify playlist 4: Import playlist 5: Delete music |
music_items | array | Music details Array containing music_id, music_memory, music_name, and singer_name |
folder_items | array | Folder (playlist) details Array containing folder_id, music_num, folder_name, and music_index |
Field Name | Field Type | Field Description |
---|---|---|
folder_id | int | Playlist (folder) id, ranging from 1 to 10 |
music_num | int | Number of songs in the playlist, maximum of 100 |
folder_name | char [] | Playlist (folder) name, maximum of 19 bytes |
music_index | int [] | Corresponding song ids in the playlist, arranged in order of addition |
Field Name | Field Type | Field Description |
---|---|---|
music_id | int | Music id, starting from 1 |
music_memory | int | Space occupied by the music |
music_name | char [] | Music name, maximum of 44 bytes |
singer_name | char [] | Singer name, maximum of 29 bytes |
Example:
{
"version": 0,
"music_operate": 0,
"folder_operate": 2,
"music_items": null,
"folder_items": {
"folder_id": 1,
"music_num": 0,
"folder_name": "music fold 1",
"music_index": []
}
}
JSON Fields Received by the App:
Field Name | Field Type | Field Description |
---|---|---|
operate_type | int | Operation type: 0: Invalid operation 1: Delete music 2: Add music 3: Delete folder 4: Add folder 5: Modify playlist 6: Import playlist 7: Delete music in playlist |
version | int | Firmware SDK card information Total space |
err_code | int | 0: Successful; non-zero: Failed |
music_id | int | Music id returned when adding music successfully |
Example:
{
"operate_type": 4,
"version": 0,
"err_code": 0,
"music_id": 0
}