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:
parent
969c25d2f7
commit
1a25f8c9fb
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user