diff options
| -rw-r--r-- | apps/gui/gwps-common.c | 3 | ||||
| -rw-r--r-- | apps/playback.c | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c index f2b444f..0ec0f64 100644 --- a/apps/gui/gwps-common.c +++ b/apps/gui/gwps-common.c @@ -824,8 +824,7 @@ static char *get_token_value(struct gui_wps *gwps, return playlist_name(NULL, buf, buf_size); case WPS_TOKEN_PLAYLIST_POSITION: - snprintf(buf, buf_size, "%d", - playlist_get_display_index()); + snprintf(buf, buf_size, "%d", id3->index + 1); return buf; case WPS_TOKEN_PLAYLIST_SHUFFLE: diff --git a/apps/playback.c b/apps/playback.c index 8fa9446..4d00eda 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -585,6 +585,7 @@ struct mp3entry* audio_current_track(void) strncpy(temp_id3.path, p, sizeof(temp_id3.path)-1); temp_id3.title = &temp_id3.path[0]; + temp_id3.index = playlist_get_display_index() - 1 + wps_offset; return &temp_id3; } @@ -1622,8 +1623,10 @@ static bool audio_load_track(int offset, bool start_play) { if (get_metadata(&id3, fd, trackname)) { + id3.index = playlist_get_display_index() + last_peek_offset - 1; + send_event(PLAYBACK_EVENT_TRACK_BUFFER, &id3); - + tracks[track_widx].id3_hid = bufalloc(&id3, sizeof(struct mp3entry), TYPE_ID3); |