From 7ba2ea4df741eb7da35bbe28f9a7d4d912dc22ec Mon Sep 17 00:00:00 2001 From: phintuka Date: Wed, 16 Aug 2006 21:13:04 +0000 Subject: Support .m3u and implicit playlists --- menu.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/menu.c b/menu.c index 4dc1d390..4b5c482b 100644 --- a/menu.c +++ b/menu.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: menu.c,v 1.6 2006-08-16 17:48:07 phintuka Exp $ + * $Id: menu.c,v 1.7 2006-08-16 21:13:04 phintuka Exp $ * */ @@ -16,6 +16,7 @@ #include #include +#include "logdefs.h" #include "config.h" #include "menu.h" #include "menuitems.h" @@ -205,6 +206,14 @@ eOSState cMenuBrowseFiles::Open(bool ForceOpen, bool Parent) free(f); return osEnd; } + if(ForceOpen && GetCurrent()->IsDir()) { + /* play all files */ + char *f = NULL; + asprintf(&f, "%s/%s/", m_CurrentDir, GetCurrent()->Name()); + cControl::Launch(new cXinelibPlayerControl(f)); + free(f); + return osEnd; + } const char *d = GetCurrent()->Name(); char *buffer = NULL; asprintf(&buffer, "%s/%s", m_CurrentDir, d); @@ -282,6 +291,7 @@ static bool IsVideoFile(const char *fname) !strcasecmp(pos, ".mp4") || !strcasecmp(pos, ".asf") || !strcasecmp(pos, ".flac") || + !strcasecmp(pos, ".m3u") || !strcasecmp(pos, ".ram")) return true; } -- cgit v1.2.3