summaryrefslogtreecommitdiffstats
path: root/player/loadfile.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-02-16 22:06:41 +0100
committerwm4 <wm4@nowhere>2015-02-16 22:08:16 +0100
commitd26ba961d05a2de165fa87c41d705ed3db00231b (patch)
treeeb3dfc217322ca600decad7a6bf7a051c6d521f5 /player/loadfile.c
parent37183532ae2b3b919540a31f56d0089cd16652d9 (diff)
downloadmpv-d26ba961d05a2de165fa87c41d705ed3db00231b.tar.bz2
mpv-d26ba961d05a2de165fa87c41d705ed3db00231b.tar.xz
command: add rescan_external_files
Requested. Hopefully will be useful for things that download and add external subtitles on demand. Or something. Closes #1586.
Diffstat (limited to 'player/loadfile.c')
-rw-r--r--player/loadfile.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/player/loadfile.c b/player/loadfile.c
index 472304d5f0..9148050c6a 100644
--- a/player/loadfile.c
+++ b/player/loadfile.c
@@ -441,9 +441,8 @@ static bool compare_track(struct track *t1, struct track *t2, char **langs,
}
return t1->user_tid <= t2->user_tid;
}
-static struct track *select_track(struct MPContext *mpctx,
- enum stream_type type, int tid, int ffid,
- char **langs)
+struct track *select_track(struct MPContext *mpctx, enum stream_type type,
+ int tid, int ffid, char **langs)
{
if (ffid != -1)
tid = -1; // prefer selecting ffid
@@ -727,7 +726,7 @@ static void open_subtitles_from_options(struct MPContext *mpctx)
mp_add_external_file(mpctx, opts->sub_name[i], STREAM_SUB);
}
-static void autoload_external_files(struct MPContext *mpctx)
+void autoload_external_files(struct MPContext *mpctx)
{
if (mpctx->opts->sub_auto < 0 && mpctx->opts->audiofile_auto < 0)
return;