@xuda.io/drive_module 1.1.983 → 1.1.984

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +4 -4
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1712,7 +1712,7 @@ const ocr_drive_file = async function (app_id, doc) {
1712
1712
  try {
1713
1713
  doc.ocr_stat = 2;
1714
1714
  doc.ocr_stat_date = Date.now();
1715
- // let save_ret = await save_drive_doc(drive_type, app_id, doc, file_path);
1715
+ let save_ret = await save_drive_doc(drive_type, app_id, doc, file_path);
1716
1716
 
1717
1717
  doc = await get_drive_doc(
1718
1718
  "file",
@@ -1734,7 +1734,7 @@ const ocr_drive_file = async function (app_id, doc) {
1734
1734
  countryData.languages.length > 0
1735
1735
  ) {
1736
1736
  // Return the first official language of the country
1737
- // return countryData.languages[0].iso639_1;
1737
+
1738
1738
  for (let language of countryData.languages) {
1739
1739
  lang += `+${language.iso639_2}`;
1740
1740
  }
@@ -1746,7 +1746,7 @@ const ocr_drive_file = async function (app_id, doc) {
1746
1746
  let lang = detectLanguageByCountry(doc.country);
1747
1747
 
1748
1748
  const generalConfig = { oem: 1, psm: 3, lang };
1749
- debugger;
1749
+
1750
1750
  switch (doc.mime.split("/")[0]) {
1751
1751
  case "image": {
1752
1752
  ocr = await tesseract.recognize(target_file, generalConfig);
@@ -1818,7 +1818,7 @@ const ocr_drive_file = async function (app_id, doc) {
1818
1818
  } finally {
1819
1819
  doc.ocr_stat_ts = Date.now();
1820
1820
 
1821
- // save_ret = await save_drive_doc(drive_type, app_id, doc, file_path);
1821
+ save_ret = await save_drive_doc(drive_type, app_id, doc, file_path);
1822
1822
  }
1823
1823
  };
1824
1824
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.983",
3
+ "version": "1.1.984",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {