Tap to add as the default action has been requested for a long time now, myself included, but mainly for accesibilty reasons, especially for my missus who has Multiple Sclerosis (MS), who finds it extremly difficult to use the kebab menu (3 dots) on a mobile device to “add to queue”. Now she can just tap away on her chosen tracks and they just get added to the queue.
Also works very well when you have guests around and they can just tap the track they want and it adds to the bottom of the queue (like a jukebox), instead of cutting a track short and playing their choice. (Teaching drunken guests to use the kebab menu in nigh on impossible)
There maybe more elegant ways to do this, but…what this does is modify the “addplay” action of volumio. So instead of adding and immediately playing, it will simply add to the queue. I have also added a toast message to let you know each track is added.
The only caveat is anything else that uses the “addplay” action Like “play” in the kebab menu and the play symbols while browsing in desktop mode will only add it to the queue and obviously not play immediately.
This modification was done using the current latest version of volumio 3.449 (30-3-2023)
Official Link
I only use local network files stored on my server and have no idea how this interacts with streaming services.
So before messing around BACKUP your SD or use a spare.
To be able to tap and add single tracks only
goto…
General Playback options
Playback mode
set to single
click “Save”
SSH into volumio
Back up the file we are going to modify.
sudo mkdir /home/backup-tta
sudo cp /volumio/app/index.js /home/backup-tta/index.js.orig
If things get messed up you can retore the original file
cp /home/backup-tta/index.js.orig /volumio/app/index.js
reboot
Modify the file
nano /volumio/app/index.js
find the text below with… Where is (ctrl w)
CoreCommandRouter.prototype.addPlay
Now go down a line and delete all the text pictured in the red box
Then paste in the text below one line at a time
this.addQueueItems(data)
this.pushToastMessage('success', this.getI18nString('COMMON.ADD_QUEUE_TITLE'), data.title || data.uri)
So it looks like this
write out (ctrl o) and exit (ctrl x)
reboot and test
If you want to go back and forth between original and modded first back up your modded file
sudo cp /volumio/app/index.js /home/backup-tta/index.js.tta
Now to change between default volumio action or Tap to Add
Default
cp /home/backup-tta/index.js.orig /volumio/app/index.js
reboot
Tap to add
cp /home/backup-tta/index.js.tta /volumio/app/index.js
reboot
I hope this helps someone, as my missus thinks its Just the Job