From f2a00f3de366d4c1da13b82c03753ba14dfee6b4 Mon Sep 17 00:00:00 2001 From: Alessandro Ghedini Date: Sun, 1 Jun 2014 18:25:21 +0200 Subject: player: write file name to the watch later config file This simply writes the file name as a comment to the top of the watch later config file. It can be useful to the user for determining whether a watch later config file can be manually removed (e.g. in case the corresponding media file has been deleted) or not. --- player/configfiles.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'player') diff --git a/player/configfiles.c b/player/configfiles.c index 3ef2b7919e..fd0a8231c0 100644 --- a/player/configfiles.c +++ b/player/configfiles.c @@ -298,6 +298,8 @@ void mp_write_watch_later_conf(struct MPContext *mpctx) FILE *file = fopen(conffile, "wb"); if (!file) goto exit; + if (mpctx->opts->write_filename_in_watch_later_config) + fprintf(file, "# %s\n", mpctx->filename); fprintf(file, "start=%f\n", pos); for (int i = 0; backup_properties[i]; i++) { const char *pname = backup_properties[i]; -- cgit v1.2.3