Use relative paths in generated m3u8 playlist

Since we're using relative paths for initi segments, and paths are
relative to the path where the playlist is located, this seems sensible.
Allows the folder to be moved, and the playlist will still work.
This commit is contained in:
Ivan Habunek 2024-08-30 11:44:07 +02:00
parent cfefae1e69
commit 4a86cb16c8
No known key found for this signature in database
GPG Key ID: 01DB3DD0D824504C

View File

@ -94,7 +94,7 @@ def make_join_playlist(
playlist.segments.clear() playlist.segments.clear()
for segment in org_segments: for segment in org_segments:
if segment.uri in path_map: if segment.uri in path_map:
segment.uri = str(path_map[segment.uri]) segment.uri = str(path_map[segment.uri].name)
playlist.segments.append(segment) playlist.segments.append(segment)
return playlist return playlist