Ejemplo n.º 1
0
char * langBrowse(const char * path)
{
	folderScan(path);
	dirVars();
	
	while (!osl_quit)
	{		
		LowMemExit();
	
		oslStartDrawing();
		
		oslClearScreen(RGB(0,0,0));	
		oldpad = pad;
		sceCtrlReadBufferPositive(&pad, 1);
		langDisplay();

		langControls(); //0 is to used for selecting a font
			
		if (strlen(returnMe) > 4) 
			break;
			
		oslEndDrawing(); 
        oslEndFrame(); 
		oslSyncFrame();
	}
	return returnMe;
}
Ejemplo n.º 2
0
char * mp3Browse(const char * path)
{
	folderScan(path);
	dirVars();
	
	while (!osl_quit)
	{		
		LowMemExit();
	
		oslStartDrawing();
		
		oslClearScreen(RGB(0,0,0));	
		oldpad = pad;
		sceCtrlReadBufferPositive(&pad, 1);

		mp3FileDisplay();
		mp3Controls();
		
		if (strlen(returnMe) > 4) 
			break;	
			
		oslEndDrawing(); 
		oslEndFrame(); 
		oslSyncFrame();	
	}
	return returnMe;
}
void LibraryManagerPrivate::fullScan()
{
    cancel    = false;
    mustClean = false;

    totalFiles  = 0;
    currentFile = 0;

    emit scanStarted();

    DataBase::instance()->clean();

    QStringList paths = LibraryManager::searchPaths();

    for ( QString path : paths ) {
        QDirIterator it(path, QDir::Files | QDir::NoDotAndDotDot, QDirIterator::FollowSymlinks | QDirIterator::Subdirectories);
        while ( it.hasNext() ) {
            totalFiles++;
            it.next();
        }
    }

    for ( QString path : paths ) {
            folderScan(path);

        QDirIterator it(path, QDir::Dirs | QDir::NoDotAndDotDot, QDirIterator::FollowSymlinks | QDirIterator::Subdirectories);
        while ( it.hasNext() ) {
            if ( cancel ) {
                mustClean = true;
                emit scanFinished();
                return;
            }

            folderScan( it.next() );
        }
    }

    totalFiles  = 0;
    currentFile = 0;
    mustClean   = true;

    emit scanFinished();
}