summaryrefslogtreecommitdiffstats
path: root/player/configfiles.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:13:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:13:14 +0000
commit60e8a3d404f0640fa5a3f834eae54b4f1fb9127d (patch)
tree1da89a218d0ecf010c67a87cb2f625c4cb18e7d7 /player/configfiles.c
parentAdding upstream version 0.37.0. (diff)
downloadmpv-85641ae1aad608329bed81c5ced87e668b7f629e.tar.xz
mpv-85641ae1aad608329bed81c5ced87e668b7f629e.zip
Adding upstream version 0.38.0.upstream/0.38.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'player/configfiles.c')
-rw-r--r--player/configfiles.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/player/configfiles.c b/player/configfiles.c
index 9441638..2b94308 100644
--- a/player/configfiles.c
+++ b/player/configfiles.c
@@ -251,6 +251,9 @@ static bool needs_config_quoting(const char *s)
static void write_filename(struct MPContext *mpctx, FILE *file, char *filename)
{
+ if (mpctx->opts->ignore_path_in_watch_later_config && !mp_is_url(bstr0(filename)))
+ filename = mp_basename(filename);
+
if (mpctx->opts->write_filename_in_watch_later_config) {
char write_name[1024] = {0};
for (int n = 0; filename[n] && n < sizeof(write_name) - 1; n++)
@@ -280,7 +283,7 @@ static void write_redirect(struct MPContext *mpctx, char *path)
static void write_redirects_for_parent_dirs(struct MPContext *mpctx, char *path)
{
- if (mp_is_url(bstr0(path)))
+ if (mp_is_url(bstr0(path)) || mpctx->opts->ignore_path_in_watch_later_config)
return;
// Write redirect entries for the file's parent directories to allow
@@ -403,7 +406,7 @@ void mp_delete_watch_later_conf(struct MPContext *mpctx, const char *file)
talloc_free(fname);
}
- if (mp_is_url(bstr0(file)))
+ if (mp_is_url(bstr0(file)) || mpctx->opts->ignore_path_in_watch_later_config)
return;
void *ctx = talloc_new(NULL);