From 82317593e9bc5bd3d7d35ae96ef777ccf801a81c Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 12 Dec 2014 23:57:49 +0100 Subject: options: add option for ignoring patch in resume mechanism Whatever. Fixes #1281. --- player/configfiles.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'player') diff --git a/player/configfiles.c b/player/configfiles.c index a18facad6d..0de1a7ba76 100644 --- a/player/configfiles.c +++ b/player/configfiles.c @@ -179,10 +179,14 @@ static char *mp_get_playback_resume_config_filename(struct mpv_global *global, const char *realpath = fname; bstr bfname = bstr0(fname); if (!mp_is_url(bfname)) { - char *cwd = mp_getcwd(tmp); - if (!cwd) - goto exit; - realpath = mp_path_join(tmp, bstr0(cwd), bstr0(fname)); + if (opts->ignore_path_in_watch_later_config) { + realpath = mp_basename(fname); + } else { + char *cwd = mp_getcwd(tmp); + if (!cwd) + goto exit; + realpath = mp_path_join(tmp, bstr0(cwd), bstr0(fname)); + } } if (bstr_startswith0(bfname, "dvd://")) realpath = talloc_asprintf(tmp, "%s - %s", realpath, opts->dvd_device); -- cgit v1.2.3