diff options
author | phintuka <phintuka> | 2007-06-12 15:11:19 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2007-06-12 15:11:19 +0000 |
commit | 8c05310d7b074c6c551f898549765faefd7bfb76 (patch) | |
tree | 9e9b53c77331fe873bef9adddd006e102f83788b /menu.c | |
parent | 1d624ffe8502ca192a0de2afc33e4ac4489a8d6d (diff) | |
download | xineliboutput-8c05310d7b074c6c551f898549765faefd7bfb76.tar.gz xineliboutput-8c05310d7b074c6c551f898549765faefd7bfb76.tar.bz2 |
If separate subtitle file is detected, save the full name of file instead
of boolean flag.
(Subtitle file name will be sent to player and xine-lib, so that even
http-streamed replay can have separate subtitles)
Diffstat (limited to 'menu.c')
-rw-r--r-- | menu.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -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.35 2007-05-17 13:36:40 phintuka Exp $ + * $Id: menu.c,v 1.36 2007-06-12 15:11:19 phintuka Exp $ * */ @@ -403,6 +403,7 @@ bool cMenuBrowseFiles::ScanDir(const char *DirName) } else if (m_Mode == ShowFiles && xc.IsVideoFile(buffer)) { bool resume = false, subs = false, dvd = false; char *pos = strrchr(e->d_name, '.'); + cString subfile; if(pos) { // .iso image -> dvd @@ -410,13 +411,13 @@ bool cMenuBrowseFiles::ScanDir(const char *DirName) dvd = true; // separate subtitles ? - cString sub = cString::sprintf("%s/%s____", DirName, e->d_name); - char *p = strrchr(sub, '.'); + subfile = cString::sprintf("%s/%s____", DirName, e->d_name); + char *p = strrchr(subfile, '.'); if( p ) { int i; for(i=0; xc.s_subExts[i] && !subs; i++) { strcpy(p, xc.s_subExts[i]); - if (stat(sub, &st) == 0) + if (stat(subfile, &st) == 0) subs = true; } } @@ -427,7 +428,7 @@ bool cMenuBrowseFiles::ScanDir(const char *DirName) if (stat(buffer, &st) == 0) resume = true; - Add(new cFileListItem(e->d_name, false, resume, subs, dvd)); + Add(new cFileListItem(e->d_name, false, resume, subs?*subfile:NULL, dvd)); } } } |