Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Rewrote server function so the first entry is selected if the path ends on a playlist or folder. If the path ends on a song, it will still play that. This will end on a random folder if the path is not selected carefully, but that happens anyway. I got rid of the old attempts for loop and replaced it by just looping over the layers of the path in order. For retries in case of server errors I added the retries functionality that can be used optionally.
Also added a menu reset at the start so it will work if the receiver was left on something other than the root menu for SERVER. Some tests as well as playing a playlist once and not switching the input to something other than server left me in various stages of the menu which made navigating it hard. This way it will always start with the server selection, no matter what happened before.
Lastly I added a retry functionality so a few numbers of retries can be specified in case of [No Content] response form the server thought I could not test that because that behavior is nothing I can command to happen for a test. This will waste quite a bit of time if there is a typo in the path, something ended up in there that does not exist on the server or the selected server is not available for some reason because all of those things will also cause retries but I am pretty sure the old logic had the same issue. As long as the number of retries is set to something smallish this should not cause issues and it has to be set by whoever uses the framework anyway since it defaults to no retries.
Fixes #85