summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
Diffstat (limited to 'player')
-rw-r--r--player/loadfile.c2
-rw-r--r--player/lua/ytdl_hook.lua6
2 files changed, 7 insertions, 1 deletions
diff --git a/player/loadfile.c b/player/loadfile.c
index bb7365c641..fc3bb97a96 100644
--- a/player/loadfile.c
+++ b/player/loadfile.c
@@ -1429,7 +1429,7 @@ static void play_current_file(struct MPContext *mpctx)
if (mpctx->demuxer->playlist) {
struct playlist *pl = mpctx->demuxer->playlist;
int entry_stream_flags = 0;
- if (!pl->disable_safety) {
+ if (!pl->disable_safety && !mpctx->opts->load_unsafe_playlists) {
entry_stream_flags = STREAM_SAFE_ONLY;
if (mpctx->demuxer->is_network)
entry_stream_flags |= STREAM_NETWORK_ONLY;
diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua
index 9dd1dc34c9..bc5c242907 100644
--- a/player/lua/ytdl_hook.lua
+++ b/player/lua/ytdl_hook.lua
@@ -644,6 +644,12 @@ function run_ytdl_hook(url)
end
mp.set_property("stream-open-filename", "memory://" .. table.concat(playlist, "\n"))
+
+ -- This disables mpv's mushy playlist security code, which will
+ -- break links that will be resolved to EDL later (because EDL is
+ -- not considered "safe", and the playlist entries got tagged as
+ -- network originating due to the playlist redirection).
+ mp.set_property_native("file-local-options/load-unsafe-playlists", true)
end
else -- probably a video