g_i writes

The unity scope doesn’t show a video thumbnail but a generic icon

medoc writes

Recoll does not generate thumbnails, it just uses them if they exist. Did you ever visit this directory with a file manager which showed thumbnails ?

g_i writes

Recoll does not generate thumbnails, it just uses them if they exist.

Yes I know

Did you ever visit this directory with a file manager which showed thumbnails ?

Yes, thumbs are there

medoc writes

Ok then, all my hopes are crushed :)

What OS and recoll versions are you using ?

g_i writes

Ubuntu 14.04 and recoll from the ppa.

(recoll is a great piece of software!)

medoc writes

It works for me with the packages that I just uploaded for trusty (happened this morning by pure chance). I have no reason to believe that they change anything, but just so that we are on the same version, could you please try to update and test again ?

g_i writes

Ok, I’ll try tonight

g_i writes

the problem is still there :(

g_i writes

A related problem is that recoll lens show also files with name containing the string, so this duplicate the function fo the standard file scope

g_i writes

Generic icon from recoll, thumbnail fron files scope

g_i writes

Additional infos: if i click on a result, the dash doesnt show any preview

g_i writes

Additional infos: with .mp4 file it works!![Schermata da 2014-03-31 22:35:59.png](https://bitbucket.org/repo/LoKMq/images/808072372-Schermata%20da%202014-03-31%2022%3A35%3A59.png)

g_i writes

the problem with preview seems limited to avi files. And, for some strange reason, with a file called 007.Casino.Royale.2006.iTALiAN.DVDRip.XviD-SiLENT.CD1.avi it open nautilus if I click both on "open" or "show in folder" :(

medoc writes

Could you please give me the full paths for a few samples which work or don’t work. This is probably related to the computation or the url hash for finding the thumbnail. With the exact paths, I can test.

The open/show in folder question is probably an unrelated issue, I’ll concentrate on thumbnails for now :)

Thanks, jf

g_i writes

I dont think is a problem of path. I tried to copy a file in "Video" and I changed the name in "foo.avi". No matter. But, I copied a mp4 file as foo.mp4, the problem is still there. May be older files were indexed with a older version of recoll…

g_i writes

ouch, the problem seems widespread… I have a folder called "Linux", it is showed with a generic icon :(

g_i writes

g_i writes

but, now foo.avi have the thumbnail … I cant understand… anyway, this is the complete path of a file

#!sh

/home/guido/Video/Film/Star Trek TOS/Star Trek (TOS) - Stagione 3 (ediz. rimasterizzata) - DVD Rip ITA [CR-Bt]/Star Trek (TOS) - 3x22 Sfida all'ultimo sangue - DVD Rip ITA (ediz. rimasterizzata) by Ken.avi

medoc writes

Hi,

I have uploaded a new version of the scope daemon which should improve some of the icons and file opening issues: https://bitbucket.org/medoc/recoll/src/06bef6aada107ea0d773b66aa8f20e3776288dac/src/desktop/unity-scope-recoll/unity_recoll_daemon.py?at=default

About the thumbnails, the problem is that Python and the desktop apparently have different ideas about URL encoding: python encodes parenthesis (, ), the desktop does not. The result is that the computed thumbnail names are different. So thumbnails will fail for files with parenthesis in the name (and maybe other special characters too, I did not do an exhaustive search).

The desktop thumbnail spec is broken by design because it relies on URL encoding, which does not have a unique definition: for many characters you have a choice of encoding or not. http://specifications.freedesktop.org/thumbnail-spec/thumbnail-spec-latest.html

Cheers, jf

g_i writes

Thank you. I’ll try tonight.

Cheers. G.

medoc writes

I just pushed another update, which will hopefully fix at least part of the missing thumbnails, so just get the latest version of the file instead of the one pointed by the link above.

g_i writes

Thanks, I’ll try later.

g_i writes

very good! Can you explain me the trick? the standard files-scope shares the same bug, so I would like to patch it.![s.jpg](https://bitbucket.org/repo/LoKMq/images/505864186-s.jpg)

g_i writes

wow, even the bug related to show in folder disappeared. Thank you to make my desktop a better place :) But… should be possible to highlight the file?

with

os.system("nautilus %s" % str(filename))

it works

medoc writes

The problem with highlighting is that I am using xdg-open to open the folder, and it is unable to pass an option. I guess that I could use nautilus directly because, after all this is part of the unity desktop, so it’s kind of expected that nautilus is the directory browser… I’ll do it, and if you want to change this, just look for xdg-open call and replace it (you can get rid of the dirname computation too).

About the thumbnail, the "trick" is that the images inside the thumbnails directory are named after a hash of the URL for the original file. The problem is that they chose to hash the encoded URL (with the %xx thingies), but there is no single way to do this, some characters should be encoded, but I can encode more. One could encode ALL characters and it would be a valid encoded URL.

So what happens is that the urllib call which I used to encode the URL in the previous version has different conventions from what we are supposed to use from the thumbnails (and which is defined nowhere as far as I know). In this case, it chose to encode the parenthesis, which should not be done if one is to get the right hash.

I replaced it with the Python version of the C++ code from the recoll GUI, which seems to work.

I think that the really right approach would be to pick up the code that the file managers use, but I’m too lazy for this.

Anyway, for fixing the standard file-share code, you either take the routine from the recoll scope, or go fish for the real stuff…