minor fix, search by id
This commit is contained in:
parent
e8a4480884
commit
c03c72fa49
2 changed files with 9 additions and 1 deletions
|
@ -33,7 +33,10 @@ object MetadataExtractorHelper {
|
|||
}
|
||||
|
||||
fun Directory.getSafeDateMillis(tag: Int, save: (value: Long) -> Unit) {
|
||||
if (this.containsTag(tag)) save(this.getDate(tag, null, TimeZone.getDefault()).time)
|
||||
if (this.containsTag(tag)) {
|
||||
val date = this.getDate(tag, null, TimeZone.getDefault())
|
||||
if (date != null) save(date.time)
|
||||
}
|
||||
}
|
||||
|
||||
// geotiff
|
||||
|
|
|
@ -19,6 +19,11 @@ class QueryFilter extends CollectionFilter {
|
|||
|
||||
QueryFilter(this.query, {this.colorful = true}) {
|
||||
var upQuery = query.toUpperCase();
|
||||
if (upQuery.startsWith('ID=')) {
|
||||
final id = int.tryParse(upQuery.substring(3));
|
||||
_test = (entry) => entry.contentId == id;
|
||||
return;
|
||||
}
|
||||
|
||||
// allow NOT queries starting with `-`
|
||||
final not = upQuery.startsWith('-');
|
||||
|
|
Loading…
Reference in a new issue