Skip to content

Random subfolder play#1175

Open
matthias-pelger wants to merge 7 commits intoMiczFlor:developfrom
matthias-pelger:random-subfolder-play
Open

Random subfolder play#1175
matthias-pelger wants to merge 7 commits intoMiczFlor:developfrom
matthias-pelger:random-subfolder-play

Conversation

@matthias-pelger
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown

@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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

Nexodaru pushed a commit to Nexodaru/RPi-Jukebox-RFID that referenced this pull request Apr 2, 2025
…, MiczFlor#1175)

Added functionality to skip to next subfolder as requested in MiczFlor#1182 and combined it with random subfolder play (MiczFlor#1175). Also added the possibility to play all or just a single subfolder.
Nexodaru pushed a commit to Nexodaru/RPi-Jukebox-RFID that referenced this pull request Apr 2, 2025
…, MiczFlor#1175)

Added functionality to skip to next subfolder as requested in MiczFlor#1182 and combined it with random subfolder play (MiczFlor#1175). Also added the possibility to play all or just a single subfolder.
Nexodaru added a commit to Nexodaru/RPi-Jukebox-RFID that referenced this pull request Apr 2, 2025
…, MiczFlor#1175) (#2)

* Added functionality to play random subdirectory ans skip (MiczFlor#1182, MiczFlor#1175)

Added functionality to skip to next subfolder as requested in MiczFlor#1182 and combined it with random subfolder play (MiczFlor#1175). Also added the possibility to play all or just a single subfolder.

---------

Co-authored-by: matthias-pelger <matthias.pelger@t-online.de>
Nexodaru added a commit to Nexodaru/RPi-Jukebox-RFID that referenced this pull request Apr 7, 2025
Nexodaru added a commit to Nexodaru/RPi-Jukebox-RFID that referenced this pull request Apr 7, 2025
…, MiczFlor#1175) (#2)

* Added functionality to play random subdirectory ans skip (MiczFlor#1182, MiczFlor#1175)

Added functionality to skip to next subfolder as requested in MiczFlor#1182 and combined it with random subfolder play (MiczFlor#1175). Also added the possibility to play all or just a single subfolder.

---------

Co-authored-by: matthias-pelger <matthias.pelger@t-online.de>
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