-
Couldn't load subscription status.
- Fork 3.1k
store normalized playlist filenames #16896
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
base: master
Are you sure you want to change the base?
Conversation
fdcea13 to
06e99db
Compare
|
Download the artifacts for this pull request: Windows |
06e99db to
019cbe1
Compare
|
Does all directory open modes work? They depend on matching filename between playlists. |
|
I'm not sure if you mean What breaks is m3u files with relative paths in a different directory (while EDL files work). ytdl_hook URLs work. #15165 is the opposite, ytdl_hook URLs break but m3u files work.
So we need to fix 1 of the 2 to simplify all the code. |
019cbe1 to
52ebd33
Compare
|
Fixed playlist files |
52ebd33 to
24a2bfb
Compare
Currently entries in playlist files like m3u are first added to the playlist, and then if they were relative paths the playlist file's dirname is prepended to them. Change it to directly add entries with the correct path. This will be needed to normalize playlist entries as soon as they are added, else normalization would prepend the working directory to entries with relative paths. demux_cue, demux_edl and demux_mkv_timeline don't need to be modified to work with the next commit.
This normalizes the playlist/N/filename sub-property, making it consistent with path. As a consequence playlist-path and stream-path are also normalized. This will allow simplifying the code by not normalizing playlist filenames in several places, similar to 23b57e9 for tracks.
24a2bfb to
dce8b88
Compare
Since the previous commit normalized playlist filenames when they are stored, the code normalizing them can be simplified back to how it was before implement normalization.
This reverts commit ee05804. Only the select.lua part since osc.lua list formatting was removed. Since playlist/N/filename is now normalized, it is never going to have trailing slashes so there is no need to strip them.
dce8b88 to
c4e4d2c
Compare
demux_playlist: add base paths when adding playlist entries
Currently entries in playlist files like m3u are first added to the playlist, and then if they were relative paths the playlist file's dirname is prepended to them.
Change it to directly add entries with the correct path. This will be needed to normalize playlist entries as soon as they are added, else normalization would prepend the working directory to entries with relative paths.
demux_cue, demux_edl and demux_mkv_timeline don't need to be modified to work with the next commit.
common/playlist: store normalized playlist filenames
This normalizes the playlist/N/filename sub-property, making it consistent with path. As a consequence playlist-path and stream-path are also normalized.
This will allow simplifying the code by not normalizing playlist filenames in several places, similar to 23b57e9 for tracks.
various: don't normalize playlist filenames again
Since the previous commit normalized playlist filenames when they are stored, the code normalizing them can be simplified back to how it was before implement normalization.
Revert "{osc,select}.lua: show playlist entries with trailing /"
This reverts commit ee05804. Only the select.lua part since osc.lua list formatting was removed.
Since playlist/N/filename is now normalized, it is never going to have trailing slashes so there is no need to strip them.
Depends on #16892