Hello, I've been implementing incremental scanning for Amarok.
Reason for this is that with large connection on a slow network share (sftp over ADSL for example) scanning can take hours. Also currently all scanned files are lost if scanning is interrupted. Even if it would takes few minutes to scan entire collection, it is good usability to be able to start playing something as soon as Amarok is started. I have modified amarokcollectionscanner to output one XML block for each scanned directory and ScanManager to parse this data on the fly. Everything works well up to this point when i give Directory instances to result processor. In this example i have 2 directories with files in database. (scanner scans first directory) Following errors are outputted for each file: [WARNING] [SqlScanResultProcessor] Found urls entry without directory. A phantom track. Removing "amarok-sqltrackuid://1ca15c03e1fe38d324e128f81afc39a0" amarok: [SqlScanResultProcessor] deleteTrack "amarok-sqltrackuid://1ca15c03e1fe38d324e128f81afc39a0" url id 107 amarok: [WARNING] [MountPointManager] Device 0 not in database, this should never happen! (second directory is scanned) For each track: [SqlScanResultProcessor] deleteTrack "amarok-sqltrackuid://a15cea27a3d60e37bcee8493e5efcbec" url id 101 In GUI only second directory is visible. Documentation on SqlScanResultProcessor is a bit vague. I suppose i am using it wrong. The following is done for each directory. I understood that ScanResultProcessor shouldn't be re-used so it's instantieted for each directory. ScanResultProcessor *processor = m_collection->getNewScanResultProcessor(); processor->setType( m_scanType ); CollectionScanner::Directory *dir = new CollectionScanner::Directory( &blockReader ); processor->addDirectory( dir ); processor->commit(); delete processor; Any ideas what might be wrong? -- Ville Ranki <ville.ra...@iki.fi> http://www.iki.fi/~cos
<<attachment: ville_ranki.vcf>>
_______________________________________________ Amarok mailing list Amarok@kde.org https://mail.kde.org/mailman/listinfo/amarok