configfiles: refactor mp_get_playback_resume_config_filename()

This avoids duplicating fname when it is a URL.
This commit is contained in:
Guido Cella authored and Kacper Michajłow committed 2024-12-09 19:23:03 +01:00
1 parent a5fa862a44
commit 0bb1659cd6
1 file changed
+3 -1
+3 -1
View File
@@ -215,7 +215,9 @@ static char *mp_get_playback_resume_config_filename(struct MPContext *mpctx,
char *res = NULL;
void *tmp = talloc_new(NULL);
const char *path = NULL;
if (opts->ignore_path_in_watch_later_config && !mp_is_url(bstr0(fname))) {
if (mp_is_url(bstr0(fname))) {
path = fname;
} else if (opts->ignore_path_in_watch_later_config) {
path = mp_basename(fname);
} else {
path = mp_normalize_path(tmp, fname);