Repository navigation
fix(resolve): resolve PLS paths against its folder - #661
jayhemnani9910 wants to merge 1 commit into
Conversation
A local PLS kept relative entries as they were, so File1=song.mp3 was looked up in the current directory instead of next to the playlist, and playlist import stored paths that playlist doctor then reported missing. Resolve each entry the way M3U entries are (resolveM3UPath with the PLS folder), which also covers file:// URIs. Tested with a new resolve test and by importing a PLS from another directory.
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Resolve and test PLS entries resolve/pls.go, resolve/pls_test.go |
resolveLocalPLS uses resolveM3UPath to resolve entries against the playlist directory. The test checks the results for relative, parent-relative, absolute, and HTTP entries. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Suggested reviewers: bjarneo
Merge Risk: 
Minimal · up to cb098
-
Local PLS entries now resolve relative to the playlist folder. No merge-blocking regression was identified; the change is ready to merge after normal checks.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed -
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
Summary
A local PLS kept relative entries as written, so
File1=song.mp3was looked up in the current directory instead of next to the playlist. M3U files already resolve them against their folder. With~/lib/playlists/mix.pls:run from another directory:
The same two entries in an
.m3ubeside it import fine on main.resolveLocalPLSnow passes every entry throughresolveM3UPathwith the PLS folder, as the M3U path does, sofile://URIs, absolute paths and stream URLs are handled as before. Remote PLS playlists are unchanged.How to test
go test ./resolve -run TestResolveLocalPLSRelativePaths(fails on main).cliamp playlist doctor, as above.Checklist
make checkpasses (62 ok, same as main)Summary by CodeRabbit