changeset 4890:0c1526391dd3

New option use-stdin to use when stdin will be used as a file Auto enable use-stdin when - is in the command line
author albeu
date Thu, 28 Feb 2002 13:47:06 +0000
parents c91a96b35522
children 30798db9527f
files cfgparser.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/cfgparser.c	Thu Feb 28 11:43:21 2002 +0000
+++ b/cfgparser.c	Thu Feb 28 13:47:06 2002 +0000
@@ -302,6 +302,10 @@
     if(!param)
       return ERR_MISSING_PARAM;
     entry = parse_playlist_file(param);
+    if(!entry) {
+      mp_msg(MSGT_CFGPARSER, MSGL_ERR, "Playlist parsing failed: %s\n",param);
+      return 1;
+    }
   }
 
   if(! IS_RUNNING(config)) {
@@ -1009,6 +1013,8 @@
 		    play_tree_t* entry = play_tree_new();
 		    mp_msg(MSGT_CFGPARSER, MSGL_DBG2,"Adding file %s\n",argv[i]);
 		    play_tree_add_file(entry,argv[i]);
+		    if(strcasecmp(argv[i],"-") == 0)
+		      m_config_set_option(config,"use-stdin",NULL);
 		    /* opt is not an option -> treat it as a filename */
 		    UNSET_GLOBAL(config); // We start entry specific options
 		    if(config->last_entry == NULL)