Bug 332065 - Metadata not shown for non-indexed files
Summary: Metadata not shown for non-indexed files
Status: RESOLVED FIXED
Alias: None
Product: Baloo
Classification: Frameworks and Libraries
Component: Widgets (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Vishesh Handa
URL:
Keywords:
: 334931 335376 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-03-12 18:39 UTC by Hrvoje Senjan
Modified: 2021-10-24 12:24 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.13.3


Attachments
~/.kde4/share/config/baloofilerc (1.47 KB, text/plain)
2019-03-09 13:58 UTC, Илья Индиго
Details
~/.config/baloofilerc (709 bytes, text/plain)
2019-03-09 14:03 UTC, Илья Индиго
Details
Tooltip (82.16 KB, image/png)
2019-03-09 14:10 UTC, Илья Индиго
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hrvoje Senjan 2014-03-12 18:39:12 UTC
small regression compared to nepomuk-widgets

Reproducible: Always
Comment 1 Vishesh Handa 2014-03-12 18:57:03 UTC
I presume you mean in the Information Panel in Dolphin? Cause that seems to work for me.
Comment 2 Hrvoje Senjan 2014-03-12 19:00:41 UTC
it does, to a certain degree. but: e.g. files have only type and size, but not width/height; artist; etc.
Comment 3 Vishesh Handa 2014-03-15 11:07:18 UTC
Git commit 95c8a4e4f74b08959a3c7000f05ea695e1990db9 by Vishesh Handa.
Committed on 13/02/2014 at 16:38.
Pushed by vhanda into branch 'KDE/4.13'.

FileMetaDataWidget: Support realtime indexing of files which are not indexed

I seem to have forgotten to push this.

M  +6    -6    src/filemetadataprovider.cpp

http://commits.kde.org/baloo-widgets/95c8a4e4f74b08959a3c7000f05ea695e1990db9
Comment 4 Hrvoje Senjan 2014-03-20 23:32:39 UTC
with baloo & baloo-widgets beta3 situation is the same...
Comment 5 Hrvoje Senjan 2014-05-17 20:00:52 UTC
still valid
Comment 6 Hrvoje Senjan 2014-05-17 20:01:10 UTC
*** Bug 334931 has been marked as a duplicate of this bug. ***
Comment 7 Wolfgang Bauer 2014-05-20 17:59:44 UTC
The commit from comment#3 cannot work actually.
It uses IndexedDataRetriever, which on turn runs "baloo_file_extractor" to get the metadata.

But running  "baloo_file_extractor" in a terminal on a non-indexed file fetches no metadata. It just prints the following debug message (after enabling debug output in kdebugdialog):
baloo_file_extractor(14261) Baloo::App::App: "/boot/boot.readme" does not exist or should not be indexed

So the widget cannot display any metadata of course.
Comment 8 Frank Reininghaus 2014-05-29 10:34:55 UTC
*** Bug 335376 has been marked as a duplicate of this bug. ***
Comment 9 Wolfgang Bauer 2014-06-16 11:48:44 UTC
This still does not work in 4.13.2.

And I want to add that it also still doesn't work with files that are in an indexed directory but are not yet indexed themselves, although baloo_file_extractor reads the metadata just fine in that case.
Comment 10 Dragon32 2014-06-20 14:41:17 UTC
Still broken for me too using 4.13.2
Comment 11 Vishesh Handa 2014-06-25 09:54:23 UTC
Confirmed. It seems I broke it while trying to fix something else. I'll fix it today and add some unit tests so that it always works.

Having multiple code paths where one is supposed to do different stuff when Baloo is enabled / disabled can get buggy.
Comment 12 Vishesh Handa 2014-06-30 11:32:14 UTC
Git commit 045a5382cc5d1386249bedd53fe9eb69710b652c by Vishesh Handa.
Committed on 30/06/2014 at 11:41.
Pushed by vhanda into branch 'KDE/4.13'.

Make sure the data is always extracted under --bdata mode

This makes the extractor work even when Baloo is disabled and no file is
set to be indexed. Also, added a unit test. Hopefully, this should now
always work.
FIXED-IN: 4.13.2

M  +2    -0    src/file/extractor/CMakeLists.txt
M  +2    -1    src/file/extractor/app.cpp
A  +6    -0    src/file/extractor/autotests/CMakeLists.txt
A  +62   -0    src/file/extractor/autotests/extractortest.cpp     [License: LGPL (v2.1+)]
A  +33   -0    src/file/extractor/autotests/extractortest.h     [License: LGPL (v2.1+)]

http://commits.kde.org/baloo/045a5382cc5d1386249bedd53fe9eb69710b652c
Comment 13 Wolfgang Bauer 2014-06-30 17:49:23 UTC
Thanks, that fixes it for files in excluded directories (f.e. outside of $HOME).

But files in included directories that are not yet indexed still don't show any metadata.

What's even worse (but has the same cause I think): if you disable the baloo indexer, none of the files in $HOME will show metadata, as they are not indexed of course, but in a directory that is to be indexed.
Only workaround is to exclude $HOME, but then there's not really a need to turn off the indexer any more.
Comment 14 Wolfgang Bauer 2014-06-30 18:33:56 UTC
PS:
The second case should be easy to fix:
Just change line#356 from:
if (!d->m_config.shouldBeIndexed(url)) {
to:
if (!d->m_config.fileIndexingEnabled() || !d->m_config.shouldBeIndexed(url)) {

But the widget should also somehow fall back to IndexedDataRetriever for files that are not in the index yet. Or index them immediately somehow.
Comment 15 Wolfgang Bauer 2014-06-30 18:36:50 UTC
(In reply to comment #14)
> PS:
> The second case should be easy to fix:
> Just change line#356 from:
> if (!d->m_config.shouldBeIndexed(url)) {
> to:
> if (!d->m_config.fileIndexingEnabled() || !d->m_config.shouldBeIndexed(url))
> {
>
That's in Baloo Widgets/src/filemetadataprovider.cpp of course...
Comment 16 Vishesh Handa 2014-07-01 09:24:55 UTC
Git commit cda2ccada499b286e5aaa70191847ea376e2f082 by Vishesh Handa.
Committed on 01/07/2014 at 09:33.
Pushed by vhanda into branch 'KDE/4.13'.

FileMetaDataProvider: Check if indexing disabled before calling IndexedDataRetriever

Patch submitted by Wolfgang Bauer <wbauer@tmo.at>

M  +1    -1    src/filemetadataprovider.cpp

http://commits.kde.org/baloo-widgets/cda2ccada499b286e5aaa70191847ea376e2f082
Comment 17 Wolfgang Bauer 2015-06-12 19:15:55 UTC
Git commit ff412d0e8563936c4da5173f014554a288d6f6f9 by Wolfgang Bauer.
Committed on 12/06/2015 at 19:06.
Pushed by wbauer into branch 'master'.

FileMetaDataProvider: Check if indexing disabled before calling IndexedDataRetriever

This is the same as commit cda2cca which seems to have been lost in the
KF5 port.

Fixes the display of metadata for files in the home directory when
indexing is disabled.
REVIEW: 124085

M  +1    -1    src/filemetadataprovider.cpp

http://commits.kde.org/baloo-widgets/ff412d0e8563936c4da5173f014554a288d6f6f9
Comment 18 Nick Stefanov 2015-08-06 19:10:22 UTC
Same here. Arch, KDE4.
Comment 19 Wolfgang Bauer 2015-08-07 10:02:19 UTC
(In reply to Nick Stefanov from comment #18)
> Same here. Arch, KDE4.
What same?
This has been fixed in 4.13.3.

What versions of baloo-widgets (on openSUSE that's the package libbaloowidgets4) and baloo are you using?

What I could imagine is that you have the KF5 version of baloo installed. The KDE4 version of baloo-widgets is incompatible with that.

In that case you either have to install the KDE4 version of baloo if possible, or wait until dolphin and baloo-widgets are released as KF5 versions (which will be in less than two weeks anyway).
Comment 20 Nick Stefanov 2015-08-07 10:14:13 UTC
Thete isn't resolution info for pictires. Baloo-widgets version 4.14.3-2. I tried both baloo and baloo4 with no avail. KDE version 4.14.10. Dolphin version 15.04.0. I try it on a virtual machine with Manjaro. Same thing - don't work.

http://i59.tinypic.com/33p59id.png
Comment 21 Wolfgang Bauer 2015-08-07 10:26:47 UTC
(In reply to Nick Stefanov from comment #20)
> Thete isn't resolution info for pictires.
There should be. It works fine in openSUSE here.

> Baloo-widgets version 4.14.3-2.
That one contains the fix, yes, so it should work.

> I tried both baloo and baloo4 with no avail.
And what did you try exactly?

To be precise, baloo-widgets4 needs the KDE4 based command "baloo_file_extractor", part of the package baloo-file in openSUSE (might be part of the baloo4 package in your case, I don't know).
Run "baloo_file_extractor -v" to check.

It won't work with the KF5 based version, as there have been incompatible changes.
If your distribution only provides that one, you'll have to wait until KDE Applications 15.08 (or build a KDE4 based baloo_file_extractor yourself).
Comment 22 Nick Stefanov 2015-08-07 10:29:45 UTC
Thank you! I'm not such an expert and for me is difficult to understand some things fot I'm from Bulgaria and english isn't my native language, so be patient :)

[mozo@mozo ~]$ baloo_file_extractor -v
Baloo File Extractor 0.1
Comment 23 Wolfgang Bauer 2015-08-07 10:37:11 UTC
(In reply to Nick Stefanov from comment #22)
> [mozo@mozo ~]$ baloo_file_extractor -v
> Baloo File Extractor 0.1
Seems to be the KF5 version then.

The KDE4 version would output something like:
wolfi@amiga:~> baloo_file_extractor -v
Qt: 4.8.6
KDE Development Platform: 4.14.9
Baloo File Extractor: 0.1

Is this with baloo4 installed?

I don't know the packaging in Arch, but apparently the KDE4 based baloo_file_extractor should be in the package baloo4. Install that instead of baloo, and check that output again.
Comment 24 Nick Stefanov 2015-08-07 10:56:11 UTC
[mozo@mozo ~]$ pacman -Qs baloo4
local/baloo4 4.14.3-2
    A KDE4 framework for searching and managing metadata
local/baloo4-akonadi 4.14.3-2
    Baloo resource for Akonadi
local/baloo4-widgets 4.14.3-2
    Widgets for Baloo
local/libbaloo4 4.14.3-2
    Libraries for baloo4

===================

[mozo@mozo ~]$ baloo_file_extractor -v
Qt: 4.8.7
KDE Development Platform: 4.14.10
Baloo File Extractor: 0.1

And again there isn't metadata for resolution.
Comment 25 Wolfgang Bauer 2015-08-07 12:11:23 UTC
(In reply to Nick Stefanov from comment #24)
> [mozo@mozo ~]$ baloo_file_extractor -v
> Qt: 4.8.7
> KDE Development Platform: 4.14.10
> Baloo File Extractor: 0.1

Ok, that's the right one now.

> And again there isn't metadata for resolution.

Does it work for files outside your home directory? E.g. /usr/share/wallpapers/ 
Can you post the file ~/.kde/share/config/baloo
If indexing is enabled, only information stored in the index will be displayed. If the indexing doesn't work for some reason, you won't see anything at all.

Also right-click on the information display and click on "Configure". Check that the information you want to see is not disabled.
Comment 26 Wolfgang Bauer 2015-08-07 12:12:33 UTC
(In reply to Wolfgang Bauer from comment #25)
> Can you post the file ~/.kde/share/config/baloo

I mean ~/.kde/share/config/baloofilerc, sorry.
And it might be located in ~/.kde4/ instead, I don't know what Arch uses.
Comment 27 Nick Stefanov 2015-08-07 16:08:50 UTC
Yes it does working in /usr/share/wallpapers now :) In home folders it doesn't.
At the Configure menu width an height are chosen but they are two times there and in info panel ьие shown twise or even many more times also. If I uncheck one of them, info panel stops showing width or height info at all. I hope you understand me :D

Here you are the file:

[General]
exclude filters=*.gmo,_darcs,lost+found,*.o,*~,moc_*.cpp,*.class,.moc,CMakeFiles,*.m4,*.tmp,CMakeTmp,*.omf,lzo,conftest,.svn,*.csproj,*.po,*.vm*,.histfile.*,.uic,.xsession-errors*,*.aux,CVS,CMakeTmpQmake,*.part,libtool,.git,*.orig,*.moc,*.rcore,*.pyc,.hg,*.la,.pch,config.status,litmain.sh,*.nvram,confdefs.h,.bzr,Makefile.am,CMakeCache.txt,core-dumps,ui_*.h,cmake_install.cmake,*.swap,*.elc,CTestTestfile.cmake,autom4te,.obj,*.lo,*.loT,qrc_*.cpp,*.pc,po,*.rej,confstat
exclude filters version=2
first run=false

=================

It is in ~/.config
Comment 28 Nick Stefanov 2015-08-07 18:52:27 UTC
It now shows them everyware, thank you :)
Comment 29 Nick Stefanov 2015-08-08 11:01:31 UTC
After restart, it suddenly stop show metadata in home folders...
Comment 30 Wolfgang Bauer 2015-08-10 16:00:27 UTC
(In reply to Nick Stefanov from comment #29)
> After restart, it suddenly stop show metadata in home folders...

Well, the home folder is normally indexed by default.
Try to disable indexing completely by adding this to the top of baloofilerc (before the "[General]":
[Basic Settings]
Indexing-Enabled=false

The metadata should then be shown in the home folder too.

If you do want to use indexing, try to delete the folder ~/.local/share/baloo and let the files be reindexed again. Maybe the KDE4 baloo doesn't work with the index from the KF5 version.
Comment 31 Nick Stefanov 2015-08-10 16:39:08 UTC
Thank you very much!
Comment 32 Rémi Verschelde 2018-06-18 10:14:42 UTC
Sorry for bumping an old bug report, but I've spent a morning trying to debug a similar issue (and this bug report is well referenced by search engines when looking for info on metadata in Dolphin).

So here's what I found today: for metadata extraction to work on non-indexed files in Plasma 5, make sure that you have baloo-widgets installed on your distro (or the package containing /usr/bin/baloo_filemetadata_temp_extractor if named differently). This tool is the one used for on-the-fly extraction of metadata when Baloo's file indexing is off.
Comment 33 Wolfgang Bauer 2018-06-19 13:11:29 UTC
(In reply to Rémi Verschelde from comment #32)
> So here's what I found today: for metadata extraction to work on non-indexed
> files in Plasma 5, make sure that you have baloo-widgets installed on your
> distro (or the package containing /usr/bin/baloo_filemetadata_temp_extractor
> if named differently). This tool is the one used for on-the-fly extraction
> of metadata when Baloo's file indexing is off.

Indeed (although that didn't exist yet in the KDE4 version this bug report was about).

You may want to report that to your distribution though, they should probably make sure that that package is installed by default...
Comment 34 Rémi Verschelde 2018-06-19 13:20:59 UTC
(In reply to Wolfgang Bauer from comment #33)
> You may want to report that to your distribution though, they should
> probably make sure that that package is installed by default...

Yes I've packaged a fix for Mageia already: https://bugs.mageia.org/show_bug.cgi?id=23194

But thought I'd mention here for users of other distros who might have the same issue, as I'm not sure it's obvious to all distro packagers that baloo-widgets should always be installed with baloo.
Comment 35 Wolfgang Bauer 2018-06-19 14:06:33 UTC
(In reply to Rémi Verschelde from comment #34)
> baloo-widgets should always be installed with baloo.

Erm, not really.
It only needs to be installed if libKF5BalooWidgets (which contains dolphin's Informations panel) is installed.
Baloo itself doesn't use it at all I think (otherwise it should rather be part of baloo I suppose).

Btw, in openSUSE we never had this problem as the lib (libKF5BalooWidgets5) and the tool (baloo_filemetadata_temp_extractor) are in one and the same package named baloo5-widgets (which is required by dolphin and other applications that might use it).
Comment 36 Rémi Verschelde 2018-06-19 14:14:42 UTC
(In reply to Wolfgang Bauer from comment #35)
> Btw, in openSUSE we never had this problem as the lib (libKF5BalooWidgets5)
> and the tool (baloo_filemetadata_temp_extractor) are in one and the same
> package named baloo5-widgets (which is required by dolphin and other
> applications that might use it).
That makes sense, I had missed this library. I'll make Mageia's lib64kf5baloowidgets5 package require our baloo-widgets (which contains baloo_filemetadata_temp_extractor) then.
Comment 37 Илья Индиго 2019-03-09 13:58:52 UTC
Created attachment 118662 [details]
~/.kde4/share/config/baloofilerc
Comment 38 Илья Индиго 2019-03-09 14:01:33 UTC
In openSUSE Tumbleweed with KDE4 It still doesn't work. :-(

When I use baloo-file and libbaloowidgets4, disabling indexing does not affect tooltips, and the image dimensions are never shown.
rm -r ~/.local/share/baloo and rebooting the system does not help.

When I use baloo5-file and baloo5-widgets, disabling the indexing causes the tooltips to stop.
When indexing is enabled, tooltips are displayed, but also without the image dimensions.
Comment 39 Илья Индиго 2019-03-09 14:03:38 UTC
Created attachment 118663 [details]
~/.config/baloofilerc
Comment 40 Илья Индиго 2019-03-09 14:10:32 UTC
Created attachment 118664 [details]
Tooltip
Comment 41 Wolfgang Bauer 2019-03-13 20:21:27 UTC
(In reply to Илья Индиго from comment #38)
> In openSUSE Tumbleweed with KDE4 It still doesn't work. :-(
"KDE4" is unmaintained/unsupported since years, and baloo 4.x as well.

So please don't reopen old bugs about that, thanks.

And new bug reports about baloo 5.x should go to the component "frameworks-baloo", btw.

> When I use baloo5-file and baloo5-widgets, disabling the indexing causes the
> tooltips to stop.

Sure, baloo5 is incompatible with "KDE4", even though it provides a "baloo_file_extractor" binary as well.

Btw, I just tried here with the latest legacy 4.x software, and tooltips do show the image dimensions with baloo disabled.

Maybe you just messed up your installation, e.g. by overwriting baloo4's baloo_file_extractor with baloo5's one.