mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
Merge branch 'pu/fb-setmode' of https://github.com/tuxbox-neutrino/gui-neutrino into ni/tuxbox
Origin commit data
------------------
Commit: 4fb2785d72
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-04-19 (Wed, 19 Apr 2017)
This commit is contained in:
@@ -2973,7 +2973,8 @@ bool CMovieBrowser::loadTsFileNamesFromDir(const std::string & dirname)
|
||||
CFileList flist;
|
||||
if (readDir(dirname, &flist) == true)
|
||||
{
|
||||
for (size_t i = 0; i < flist.size(); i++)
|
||||
size_t count = flist.size();
|
||||
for (size_t i = 0; i < count; i++)
|
||||
{
|
||||
if (S_ISDIR(flist[i].Mode)) {
|
||||
if (m_settings.ts_only || !CFileBrowser::checkBD(flist[i])) {
|
||||
@@ -2984,7 +2985,8 @@ bool CMovieBrowser::loadTsFileNamesFromDir(const std::string & dirname)
|
||||
} else {
|
||||
result |= addFile(flist[i], dirItNr);
|
||||
}
|
||||
OnLocalProgress(i, flist.size(), dirname );
|
||||
if (result)
|
||||
OnLocalProgress(i, count, dirname );
|
||||
}
|
||||
//result = true;
|
||||
}
|
||||
@@ -3223,6 +3225,9 @@ void CMovieBrowser::loadMovies(bool doRefresh)
|
||||
{
|
||||
TRACE("[mb] loadMovies: \n");
|
||||
|
||||
struct timeval t1, t2;
|
||||
gettimeofday(&t1, NULL);
|
||||
|
||||
CProgressWindow loadBox((show_mode == MB_SHOW_YT) ? LOCALE_MOVIEPLAYER_YTPLAYBACK : LOCALE_MOVIEBROWSER_SCAN_FOR_MOVIES, CCW_PERCENT 50, CCW_PERCENT 10, NULL, show_mode == MB_SHOW_YT ? &ytparser.OnProgress : &OnLocalProgress, &OnGlobalProgress);
|
||||
loadBox.enableShadow();
|
||||
loadBox.paint();
|
||||
@@ -3238,6 +3243,11 @@ void CMovieBrowser::loadMovies(bool doRefresh)
|
||||
}
|
||||
m_file_info_stale = false;
|
||||
|
||||
gettimeofday(&t2, NULL);
|
||||
uint64_t duration = ((t2.tv_sec * 1000000ULL + t2.tv_usec) - (t1.tv_sec * 1000000ULL + t1.tv_usec)) / 1000ULL;
|
||||
if (duration)
|
||||
fprintf(stderr, "\033[33m[CMovieBrowser] %s: %" PRIu64 " ms to scan movies \033[0m\n",__func__, duration);
|
||||
|
||||
loadBox.hide();
|
||||
|
||||
if (doRefresh)
|
||||
|
Reference in New Issue
Block a user