1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-18 04:51:52 +00:00

external_files: parse ~ in --{sub,audio}-paths

This commit is contained in:
rr- 2017-05-30 17:07:59 +02:00 committed by Ricardo Constantino
parent 969c25d2f7
commit 1a25f8c9fb
No known key found for this signature in database
GPG Key ID: EFD16019AE4FF531

View File

@ -261,9 +261,13 @@ static void load_paths(struct mpv_global *global, struct subfn **slist,
char *cfg_path, int type)
{
for (int i = 0; paths && paths[i]; i++) {
char *path = mp_path_join_bstr(*slist, mp_dirname(fname),
bstr0(paths[i]));
append_dir_subtitles(global, slist, nsubs, bstr0(path), fname, 0, type);
char *expanded_path = mp_get_user_path(NULL, global, paths[i]);
char *path = mp_path_join_bstr(
*slist, mp_dirname(fname),
bstr0(expanded_path ? expanded_path : paths[i]));
append_dir_subtitles(global, slist, nsubs, bstr0(path),
fname, 0, type);
talloc_free(expanded_path);
}
// Load subtitles in ~/.mpv/sub (or similar) limiting sub fuzziness