mirror of
https://git.wetfence.xyz/RandyTheSilly/jellyPod.git
synced 2026-10-26 23:39:56 -04:00
Initial music playback!
This commit is contained in:
1 parent
1e9375f5e9
commit
9798dcb08e
2 files changed
+69
-26
No files matched your search
+19
-1
@@ -124,6 +124,24 @@ static void inbox_received_handler(DictionaryIterator *iter, void *context) {
|
||||
}
|
||||
}
|
||||
|
||||
static void to_pkjs_play_from_track(uint16_t seqId) {
|
||||
if (!s_pkjs_ready) {
|
||||
return;
|
||||
}
|
||||
|
||||
DictionaryIterator *out;
|
||||
AppMessageResult result = app_message_outbox_begin(&out);
|
||||
if (result != APP_MSG_OK) {
|
||||
return;
|
||||
}
|
||||
dict_write_uint16(out, MESSAGE_KEY_OUT_PLAY_SEQ_ID, seqId);
|
||||
|
||||
result = app_message_outbox_send();
|
||||
if (result != APP_MSG_OK) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
static void to_pkjs_move_deeper(NavScope scope, uint16_t *subscope_index) {
|
||||
if (!s_pkjs_ready) {
|
||||
return;
|
||||
@@ -236,7 +254,7 @@ static void menu_select_click(struct MenuLayer *menu_layer, MenuIndex *clicked_i
|
||||
to_pkjs_move_deeper(s_current_menu_scope + 1, &clicked_index->row);
|
||||
break;
|
||||
case NAV_SCOPE_ALBUM_TRACKS:
|
||||
// TODO tell PKJS to play track (and queue sequential tracks)
|
||||
to_pkjs_play_from_track(s_current_menu_seq_ids[clicked_index->row]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user