Skip to content

Commit

Permalink
#169: fixed csv import under ao10: now updating both databases works …
Browse files Browse the repository at this point in the history
…as expected
  • Loading branch information
k3b committed Feb 7, 2021
1 parent 7f90ca6 commit 99cd036
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ public static Long updateDB(
TagSql.setXmpFileModifyDate(dbValues, xmpFilelastModified);
TagSql.setFileModifyDate(dbValues, newFullJpgFilePath);

return TagSql.insertOrUpdateMediaDatabaseFromCsv(
return TagSql.execUpdate(
dbgContext, oldFullJpgFilePath,
TagSql.EXT_LAST_EXT_SCAN_UNKNOWN,
dbValues, VISIBILITY.PRIVATE_PUBLIC);
Expand All @@ -385,6 +385,12 @@ public static Long updateDB(
return 0L;
}

public static long execUpdate(String dbgContext, String path, long xmpFileDate, ContentValues values, VISIBILITY visibility) {
if (!Global.Media.enableXmpNone || isPseudoXmpFileDateVauel(xmpFileDate)) {
return getMediaDBApi().execUpdate(dbgContext, path, values, visibility);
}
return getMediaDBApi().exexUpdateImpl(dbgContext, values, FILTER_EXPR_PATH_AND_XMP_DATE_LESS_THAN, new String[]{path, Long.toString(xmpFileDate)});
}

public static Long insertOrUpdateMediaDatabaseFromCsv(
String dbgContext, String path, long xmpFileDate,
Expand Down

0 comments on commit 99cd036

Please sign in to comment.