diff options
author | wm4 <wm4@nowhere> | 2014-12-12 23:57:49 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-12-13 00:04:08 +0100 |
commit | 82317593e9bc5bd3d7d35ae96ef777ccf801a81c (patch) | |
tree | c7f5b0639bd77636744ebd9590bd53d98e07a1e7 /player/configfiles.c | |
parent | 98e400216d7c6545ffd7d1909c7bfac09b9862f3 (diff) | |
download | mpv-82317593e9bc5bd3d7d35ae96ef777ccf801a81c.tar.bz2 mpv-82317593e9bc5bd3d7d35ae96ef777ccf801a81c.tar.xz |
options: add option for ignoring patch in resume mechanism
Whatever.
Fixes #1281.
Diffstat (limited to 'player/configfiles.c')
-rw-r--r-- | player/configfiles.c | 12 |
1 files changed, 8 insertions, 4 deletions
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); |