Project

General

Profile

aperturelibraryfix.diff

Patch for filtering by aperture - Frederick Kocksch, 05/18/2013 12:38 AM

View differences:

src/common/collection.c
502 502
      snprintf(query, 1024, "(iso like '%%%s%%')", escaped_text);
503 503
      break;
504 504
    case DT_COLLECTION_PROP_APERTURE: // aperture
505
      snprintf(query, 1024, "(aperture like '%%%s%%')", escaped_text);
505
      snprintf(query, 1024, "(round(aperture,1) like '%%%s%%')", escaped_text);
506 506
      break;
507 507
    case DT_COLLECTION_PROP_FILENAME: // filename
508 508
      snprintf(query, 1024, "(filename like '%%%s%%')", escaped_text);
src/libs/collect.c
1196 1196
      snprintf(query, 1024, "select distinct cast(iso as integer) as iso, 1 from images where iso like '%%%s%%' order by iso", escaped_text);
1197 1197
      break;
1198 1198
    case DT_COLLECTION_PROP_APERTURE: // aperture
1199
      snprintf(query, 1024, "select distinct round(aperture,1) as aperture, 1 from images where aperture like '%%%s%%' order by aperture", escaped_text);
1199
      snprintf(query, 1024, "select distinct round(aperture,1) as aperture, 1 from images where round(aperture,1) like '%%%s%%' order by aperture", escaped_text);
1200 1200
      break;
1201 1201
    case DT_COLLECTION_PROP_FILENAME: // filename
1202 1202
      snprintf(query, 1024, "select distinct filename, 1 from images where filename like '%%%s%%' order by filename", escaped_text);
Go to top