MiczFlor / RPi-Jukebox-RFID

A Raspberry Pi jukebox, playing local music, podcasts, web radio and streams triggered by RFID cards, web app or home automation. All plug and play via USB. GPIO scripts available.
http://phoniebox.de
MIT License
1.38k stars 397 forks source link

Resume play not working with release 1.0 #157

Closed MalteHST closed 6 years ago

MalteHST commented 6 years ago

Has somebody also discovered problems with the resume play in the release 1.0? I'm using a Pi Zero with pHat BEAT and am not be able to adjust the resume play function over the web player.

MiczFlor commented 6 years ago

Hi @MalteHST any progress on this? Worked for me :/

MalteHST commented 6 years ago

Hi @MiczFlor , unfortunately not. Is there anything else to do after a fresh clean installation of the phoniebox except to switch resume play on in the web player for a specific folder? The file folder.conf in this audiofolder is always up to date.

MiczFlor commented 6 years ago

What iFace are you using for the soundcard? This needs to be added in the settings folder file and in /etc/mpd.conf. (On my mobile, apologies for typos and shorthand)

MalteHST commented 6 years ago

I'm using the pHat BEAT from Pimoroni for audio output and it works perfectly. So I guessed my iFace is Master, which I've added in the file 'Audio_iFace_Name'. I've found the other file but don't know exactly where I must adapt the code. Can you please show me the line where I have to adjust the other file (mpd.conf)?

MiczFlor commented 6 years ago

On my mobile so only reporting frommemory: there is a line in the conf, commented put, which contains PCM by default. The install script changes that to what you add during install. In other words: see the install script for details

MalteHST commented 6 years ago

Master as audio output was already set. Also if I set everything to PCM and disconnect the pHat BEAT the resume play switch in the web player has no function for me. Did I get it right that resume play also should work for controlling the music just over the web player, without an RFID Reader connected?

zxa commented 6 years ago

Resume play works for control with RFID and web app.

Could you switch resume play on for some folder and start playing. Please post the content of the folder.conf of that folder here. Then press stop and check the content of that file again.

MalteHST commented 6 years ago

Here is the content of my folder.conf while playing with resume switch on: CURRENTFILENAME="Only by the Night/01 Closer.mp3" ELAPSED="58.990" PLAYSTATUS="Playing" RESUME="ON" SHUFFLE="OFF" LOOP="OFF"

And after stoping the playlist over the web player: CURRENTFILENAME="Only by the Night/01 Closer.mp3" ELAPSED="96.240" PLAYSTATUS="Stopped" RESUME="ON" SHUFFLE="OFF" LOOP="OFF"

If I press afterwards 'PLAY' the music resumes at the point where I stopped it before. But if I switch to another playlist/folder and then go back to the folder with resume switch on, the music starts always from the beginning. This is also happening if I reboot the raspberry.

I hope that I get the intended use-case of the resume play right. Or is this feature not able to resume a playlist after another one was played in between or the phoniebox is rebooted?

(my setup for this test is a bare Pi Zero without any devices connected. Fresh install of stretch-lite and phoniebox with default values. Controlling only with the web player.)

zxa commented 6 years ago

You got the use case of resume play right.

Can you please check for the file /settings/Latest_Folder_Played and if the content changes if you start different playlists (folders).

MalteHST commented 6 years ago

I've checked it. The file content changes everytime I start a new playlist.

Is it possible that stretch-lite is not the right operating system or the pi Zero is constricted in any point unable to execute some operations? (in comparison with Pi3 with complete stretch)

zxa commented 6 years ago

You could try to replace the files:

scripts/playout_controls.sh scripts/resume_play.sh scripts/rfid_trigger_play.sh

with these of my branch https://github.com/zxa/RPi-Jukebox-RFID/tree/clean-up?files=1

MalteHST commented 6 years ago

Interesting. Works perfectly. Many thanks for you help. I don't know exactly where the difference is to the master branch, but is it planned to take over these adaptions to the master branch of @MiczFlor ?

Thanks.

zxa commented 6 years ago

The pull request #155 is pending. In case it is merged, you have to revert the manual changes with: git stash

MiczFlor commented 6 years ago

Hi, Thanks for the feedback. Please don‘t close this thread, I am on holidays and will work this into the script an web app in the coming days All the best, micz

MiczFlor commented 6 years ago

I merged the pull request(s): https://github.com/MiczFlor/RPi-Jukebox-RFID/commit/f026461d3009b82b6f938c76f0c57d9e0f178595