Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random subfolder play #1175

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

matthias-pelger
Copy link

Reason for improvement:
See #1170
Missing functionality to play a random subfolder when a card is assigned to the top folder and the conf is set accordingly.

Proposal:
Minor changes and additions necessary.
Possible breaking change: changed logic to check for second swipe: Instead to check for LASTPLAYLIST now LASTID is used. LASTID is basically the folder from CARDID, separating the really played folder from the one assigned to the card.
Beside this, the LASTPLAYLIST is still there and being set. I think this will not break anything and still enable a thourough secondswipe check.

Backend
New parameter introduced in "folder.conf", FOLDERSHUFFLE to save setting for folder. Also used in WebUI.
The button is shown if there is at least one subfolder. With this button, also a new api file is introduced.

@s-martin s-martin linked an issue Dec 7, 2020 that may be closed by this pull request
@s-martin s-martin added this to the 2.3 milestone Dec 7, 2020
…1182 and combined it with random subfolder play (MiczFlor#1175). Also added the possibility to play all or just a single subfolder.
@matthias-pelger
Copy link
Author

Hi all, just added skip subfolder functionality as requested in #1182
This is done via folder.conf parameter and using the existing second swipe logic.

Unfortunately, it required some more mangling with rfid_trigger_play.sh, but it should not be noticed by surroundings.
Included also the frontend stuff and debugging info.

@s-martin s-martin modified the milestones: 2.3, 2.4 May 15, 2021
Copy link

@Karli2727 Karli2727 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scripts/rfid_trigger_play.sh

Line 516 - missing second ">" , therefore subfolder play won't start.

@s-martin
Copy link
Collaborator

scripts/rfid_trigger_play.sh

Line 516 - missing second ">" , therefore subfolder play won't start.

Thanks for your comment.
Can you write the correct code in a comment?

@s-martin s-martin removed this from the 2.4 milestone Aug 28, 2022
@s-martin s-martin added the legacy_v2 Issues, discussions and PRs related to Version 2.x label Apr 4, 2024
# replace subfolder slashes with " % "
PLAYLISTPATH="${PLAYLISTSFOLDERPATH}/${FOLDER//\//\ %\ }.m3u"
PLAYLISTNAME="${FOLDER//\//\ %\ }"
echo "" > "${PLAYLISTPATH}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
echo "" > "${PLAYLISTPATH}"
echo "" >> "${PLAYLISTPATH}"

@s-martin
Copy link
Collaborator

s-martin commented Apr 8, 2024

scripts/rfid_trigger_play.sh

Line 516 - missing second ">" , therefore subfolder play won't start.

Added https://github.com/MiczFlor/RPi-Jukebox-RFID/pull/1175/files#r1556369182

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement help wanted legacy_v2 Issues, discussions and PRs related to Version 2.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🚀 | Enable Phoniebox to play a random subfolder
3 participants