Bug 410114 - Display file metadata from alternative source during Baloo indexing operation
Summary: Display file metadata from alternative source during Baloo indexing operation
Alias: None
Product: baloo-widgets
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Stefan Brüns
Keywords: usability
Depends on:
Reported: 2019-07-22 18:11 UTC by Łukasz Szeremeta
Modified: 2019-11-14 00:44 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 20.04.0


Note You need to log in before you can comment on or make changes to this bug.
Description Łukasz Szeremeta 2019-07-22 18:11:30 UTC
File properties are not displayed for unindexed files if indexation is on. When indexing is disabled on the given media, file properties are visible instantly. Why do I need to activate re-indexing manually or restart my system if indexation is enabled to see additional metadata in new files? Maybe it would be possible to display properties without waiting also in the case of indexation enabled? I mentioned about this in the bug 409876 and bug 409881. As Nate Graham told: "What might make sense is to always display the KFileMetadata-extracted properties during indexing, and then only replace that information with the Baloo-extracted information  for each individual file as it gets indexed. That would definitely be a nice UX improvement.". Thanks for looking at it.

1. Make sure if indexing is turned on at the main disk, if not, turn it on
2. Wait to indexing end
3. Download file with additional metadata (e.g. this photo with EXIF: https://github.com/ianare/exif-samples/blob/master/jpg/Canon_40D.jpg) and save it on main disk (not external)
4. Open Dolphin and find downloaded file
5. Right click -> Properties

Only standard properties are visible: file type, size, modification time, tags, stars and comments.

Standard properties + some other metadata like camera model and so on

Linux/KDE Plasma: KDE Neon User Edition 5.16.3 (Linux 4.18.0-25-generic)
(available in About System)
KDE Plasma Version: 5.16.3
KDE Frameworks Version: 5.60.0
Qt Version: 5.12.3

Comment 1 Stefan Brüns 2019-11-13 23:58:54 UTC
Git commit d202cc3854c007f40cc6da13532fd30bfdaded2a by Stefan Brüns.
Committed on 13/11/2019 at 23:58.
Pushed by bruns into branch 'master'.

Use realtime indexing as fallback when DB has no property data

In case the DB provides no data, try to fetch the properties directly
from the file using the new OnDemandIndexer class.

If required, start the extractor in the background, fetch UserMetaData
and wait for the extractor, then unite the results.
Depends on D25248

Test Plan:
  # suspend baloo (`balooctl suspend`)
  # copy a file with properties (e.g. PNG) to a included location
    `cp ~/foo.png ~/foo_2.png`
  # `balooshow ~/foo.png ~/foo_2.png` should only display "Cached properties"
     for the original file
  # dolphin displays properties for both files (in the side panel)

Reviewers: #baloo, ngraham, astippich

Reviewed By: #baloo, ngraham, astippich

Tags: #baloo

Differential Revision: https://phabricator.kde.org/D25250

M  +30   -8    src/filefetchjob.cpp
M  +10   -1    src/filefetchjob.h
M  +11   -8    src/filemetadataprovider.cpp
M  +5    -0    src/ondemandextractor.cpp
M  +1    -0    src/ondemandextractor.h