/** * 保存入库 * * @throws FileNotFoundException */ private void save(POMedia media) { mDbWhere.put("path", media.path); mDbWhere.put("last_modify_time", media.last_modify_time); // 检测 if (!mDbHelper.exists(media, mDbWhere)) { try { if (media.title != null && media.title.length() > 0) media.title_key = PinyinUtils.chineneToSpell(media.title.charAt(0) + ""); } catch (Exception ex) { Logger.e(ex); } media.last_access_time = System.currentTimeMillis(); // 提取缩略图 // extractThumbnail(media); media.mime_type = FileUtils.getMimeType(media.path); // 入库 mDbHelper.create(media); // 扫描到一个 notifyObservers(SCAN_STATUS_RUNNING, media); } }