diff options
| author | phintuka <phintuka> | 2011-07-10 21:35:22 +0000 |
|---|---|---|
| committer | phintuka <phintuka> | 2011-07-10 21:35:22 +0000 |
| commit | 6225ec84de16738b9b4a154a6737ee45962f33d5 (patch) | |
| tree | d5c5bcbea493082a7f9c7ae9f5937019c6fe92de | |
| parent | e82321147e89dff667e552afb58cc18318ee693a (diff) | |
| download | xineliboutput-6225ec84de16738b9b4a154a6737ee45962f33d5.tar.gz xineliboutput-6225ec84de16738b9b4a154a6737ee45962f33d5.tar.bz2 | |
Assume .iso images larger than 10G are BluRay images
| -rw-r--r-- | config.c | 13 | ||||
| -rw-r--r-- | config.h | 3 | ||||
| -rw-r--r-- | menu.c | 10 |
3 files changed, 23 insertions, 3 deletions
@@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: config.c,v 1.104 2011-07-10 17:46:52 phintuka Exp $ + * $Id: config.c,v 1.105 2011-07-10 21:35:22 phintuka Exp $ * */ @@ -421,6 +421,17 @@ bool config_t::IsDvdImage(const char *fname) return (ext && !strcasecmp(ext, "iso")) ? true : false; } +bool config_t::IsBluRayImage(const char *fname) +{ + if (IsDvdImage(fname)) { + struct stat st; + if (!stat(fname, &st)) { + return st.st_size > 10*1024*1024*1024ll; + } + } + return false; +} + bool config_t::IsDvdFolder(const char *fname) { struct stat st; @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: config.h,v 1.80 2011-07-10 17:57:14 phintuka Exp $ + * $Id: config.h,v 1.81 2011-07-10 21:35:22 phintuka Exp $ * */ @@ -453,6 +453,7 @@ class config_t { static bool IsDvdFolder(const char *); static bool IsBluRayFolder(const char *); static bool IsDvdImage(const char *); + static bool IsBluRayImage(const char *); cString AutocropOptions(void); cString SwScaleOptions(void); @@ -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.87 2011-06-14 21:56:17 phintuka Exp $ + * $Id: menu.c,v 1.88 2011-07-10 21:35:22 phintuka Exp $ * */ @@ -408,6 +408,10 @@ eOSState cMenuBrowseFiles::Open(bool ForceOpen, bool Queue, bool Rewind) if (Rewind) unlink(cString::sprintf("%s.resume", *f)); + if (GetCurrent()->IsBluRay()) { + AddSubMenu(new cMenuBluray(f)); + return osContinue; + } if (GetCurrent()->IsDvd()) cPlayerFactory::Launch(pmAudioVideo, cPlaylist::BuildMrl("dvd", f), NULL, true); else @@ -480,6 +484,10 @@ bool cMenuBrowseFiles::ScanDir(const char *DirName) } else if (m_Mode == ShowImages && xc.IsImageFile(buffer)) { Add(new cFileListItem(e->d_name, false)); + // BluRay image (.iso) + } else if (m_Mode == ShowFiles && xc.IsBluRayImage(buffer)) { + Add(new cFileListItem(e->d_name, false, false, NULL, false, true)); + // DVD image (.iso) } else if (m_Mode == ShowFiles && xc.IsDvdImage(buffer)) { Add(new cFileListItem(e->d_name, false, false, NULL, true)); |
