-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
0.15.0 playlist problems when using a preset name that begins with a number #4445
Comments
The root cause is not what you observed. The problem lies in default value used when creating select object. |
Sorry new to WLED but what default value are you referring? In the playlist when adding a preset? Or do you mean a default value when creating a preset first? Are you saying there is a bug but not as I described? Or are you saying the problem lies in the way I am creating either the presets or the playlist and it not a bug? Thanks. |
Yes. I was providing more insight for other collaborators. |
@blazoncek your commit is rather large, and not good for cherry-picking into upstream. Can you give us a hint on how a minimal fix could be created? |
@softhack007 don't you want to use nested playlists? The minimal change needed is in index.js. |
@blazoncek not sure, it seems there is some nested-playlist-hype on discord? Personally I have no idea what is the use case for nested playlists (nested by a single level, or deeply nested?). Independent from other playlist stuff under development, I think it would be very useful to have a minimal fix for the bug described in this problem report - i.e. something that is no longer than 10 lines, and can be cherry-picked into the next bugfix release 0.15.0.1. |
It is a single level nesting but useful nevertheless. It is already possible to create nested playlists manually by editing playlist preset. There is one caveat, top playlist will not continue but it will restart in such case. Just ask @dosipod If you want single line fix, this is it: |
What happened?
When creating a playlist using the scrolling text effect, if the preset text starts with a number the playlist skips those presets. The one exception to this is if the numbered text preset is the very first one in the playlist, then only the first instance will play while all subsequent additions of it will be skipped. Switch off the playlist editor to show the API reveals that the subsequent additions of the same scrolling text preset got entered as 0.
For example the playlist API shows
{"playlist":{"ps":[8,2,0,3,0,4,0],"dur":[100,100,100,100,100,100,100],"transition":[7,7,7,7,7,7,7],"repeat":0,"end":0,"r":false},"on":true}
where the [8,2,0,3,0,4,0] part should be [8,2,1,3,1,4,1] and manually changing the 0s to 1s fixes the problem.
To Reproduce Bug
You can go back into the API command window and replace the 0s with whatever number your "1 Bug Text" preset is and save and now you should see all 5 presets play.
After writing all the above, playing around with it some more and determining that if you start with the numbered text one, it will play the first, an even easier method to reproduce this is make the playlist simply "1 Bug Text" as many times in a row as you want and the API will look like [6,0,0,0,0,0].
Expected Behavior
All presets added in the playlist editor should be added as non-0 in the API.
Install Method
Binary from WLED.me
What version of WLED?
WLED v0.15.0, build 241210, Environment ESP32-S2 v4.4.4 (0)
Which microcontroller/board are you seeing the problem on?
ESP32-S2
Relevant log/trace output
No response
Anything else?
Wemos Lolin ESP32-S2 Mini board. Talking to it on a Mac running Chrome (both latest versions) using the web interface (i.e. typed in board IP address to get to the WLED built in menu.
I did not try this through the phone app.
Code of Conduct
The text was updated successfully, but these errors were encountered: