[Toxine-cvs] CVS: toxine/src commands.c,1.7,1.8
Brought to you by:
f1rmb
From: Daniel Caujolle-B. <f1...@us...> - 2002-07-01 21:30:10
|
Update of /cvsroot/toxine/toxine/src In directory usw-pr-cvs1:/tmp/cvs-serv16339 Modified Files: commands.c Log Message: Merge checks. Index: commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/commands.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- commands.c 30 Jun 2002 15:44:05 -0000 1.7 +++ commands.c 1 Jul 2002 21:30:07 -0000 1.8 @@ -344,7 +344,6 @@ } - #if 0 pinfo("Get xine event:\n"); poutalign(); @@ -1469,18 +1468,24 @@ else if(toxine_is_arg_contain(tox, 1, "from")) { char **ap; int i, mrls; - + CHECK_XINE(tox); - + pinfo("Grab mrls from '%s' input plugin.\n", toxine_get_arg(tox, 2)); ap = xine_get_autoplay_mrls(tox->xine, (char *) (toxine_get_arg(tox, 2)), &mrls); - if(ap) { - - for(i = 0; i < mrls; i++) + if(ap && mrls) { + + for(i = 0; i < mrls; i++) { tox->playlist.entries[tox->playlist.num++] = strdup(ap[i]); - } + } - if((!ap) || (!mrls)) + if(tox->playlist.num && (tox->playlist.cur == -1)) { + tox->playlist.cur = 0; + toxine_set_current_mrl_from_cur(tox); + } + + } + else pinfo("Plugin '%s' returned nothing.\n", toxine_get_arg(tox, 2)); } |