04-27-2021, 09:31 PM
The Queue position of the previously played item (song or radio station) is stored in a SQL column. You can play it via MPC command. See example below.
Code:
# Assume item 43 is currently playing item and item 37 was previously played item,
pi@rp1:~ $ moodeutl -q "select value from cfg_system where param='toggle_songid'"
37
pi@rp1:~ $ mpc play 37
Mission Control: Celebrating NASA and space explorers everywhere. [SomaFM]: LAD - Inertia
[playing] #37/48 0:00/0:00 (0%)
volume: 15% repeat: off random: off single: off consume: off
pi@rp1:~ $ moodeutl -q "select value from cfg_system where param='toggle_songid'"
43