library: use RhythmDBImportJob when adding to the database (bug #547174)
RhythmDBImportJob provides progress information, so we can display that to the user, and allows cancellation (not exposed through the interface yet). RhythmDBImportJob requires all URIs to be added before it starts importing, but rb_source_add_uri only gets them one at a time. To work around this, we use a short timeout to collect as many as possible. In case a new job is started before an existing one finishes, we keep a list of them so we can cancel all outstanding jobs on shutdown. Only the progress information from the most recently started job is displayed.
parent
1e9ebb59
Please register or sign in to comment