mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
CMovieBrowser: visualize progress during load movies
TODO: youtube load
This commit is contained in:
@@ -2874,7 +2874,7 @@ bool CMovieBrowser::loadTsFileNamesFromDir(const std::string & dirname)
|
|||||||
CFileList flist;
|
CFileList flist;
|
||||||
if (readDir(dirname, &flist) == true)
|
if (readDir(dirname, &flist) == true)
|
||||||
{
|
{
|
||||||
for (unsigned int i = 0; i < flist.size(); i++)
|
for (size_t i = 0; i < flist.size(); i++)
|
||||||
{
|
{
|
||||||
if (S_ISDIR(flist[i].Mode)) {
|
if (S_ISDIR(flist[i].Mode)) {
|
||||||
if (m_settings.ts_only || !CFileBrowser::checkBD(flist[i])) {
|
if (m_settings.ts_only || !CFileBrowser::checkBD(flist[i])) {
|
||||||
@@ -2885,6 +2885,7 @@ bool CMovieBrowser::loadTsFileNamesFromDir(const std::string & dirname)
|
|||||||
} else {
|
} else {
|
||||||
result |= addFile(flist[i], dirItNr);
|
result |= addFile(flist[i], dirItNr);
|
||||||
}
|
}
|
||||||
|
OnLoadFile(i, flist.size(), g_Locale->getText(LOCALE_MOVIEBROWSER_SCAN_FOR_MOVIES));
|
||||||
}
|
}
|
||||||
//result = true;
|
//result = true;
|
||||||
}
|
}
|
||||||
@@ -3123,7 +3124,8 @@ void CMovieBrowser::loadMovies(bool doRefresh)
|
|||||||
{
|
{
|
||||||
TRACE("[mb] loadMovies: \n");
|
TRACE("[mb] loadMovies: \n");
|
||||||
|
|
||||||
CHintBox loadBox((show_mode == MB_SHOW_YT) ? LOCALE_MOVIEPLAYER_YTPLAYBACK : LOCALE_MOVIEBROWSER_HEAD, g_Locale->getText(LOCALE_MOVIEBROWSER_SCAN_FOR_MOVIES));
|
CProgressWindow loadBox((show_mode == MB_SHOW_YT) ? LOCALE_MOVIEPLAYER_YTPLAYBACK : LOCALE_MOVIEBROWSER_HEAD, 500, 150, &OnLoadFile);
|
||||||
|
loadBox.enableShadow();
|
||||||
loadBox.paint();
|
loadBox.paint();
|
||||||
|
|
||||||
if (show_mode == MB_SHOW_YT) {
|
if (show_mode == MB_SHOW_YT) {
|
||||||
|
@@ -362,6 +362,7 @@ class CMovieBrowser : public CMenuTarget
|
|||||||
void clearSelection();
|
void clearSelection();
|
||||||
bool supportedExtension(CFile &file);
|
bool supportedExtension(CFile &file);
|
||||||
bool addFile(CFile &file, int dirItNr);
|
bool addFile(CFile &file, int dirItNr);
|
||||||
|
sigc::signal<void, size_t, size_t, std::string> OnLoadFile;
|
||||||
};
|
};
|
||||||
|
|
||||||
// I tried a lot to use the menu.cpp as ListBox selection, and I got three solution which are all garbage.
|
// I tried a lot to use the menu.cpp as ListBox selection, and I got three solution which are all garbage.
|
||||||
|
Reference in New Issue
Block a user