Ubuntu QA:
BlogBrainstormPackage status
Log in
Ubuntu QA
The Ubuntu community has contributed 22700 ideas, 138270 comments, 2629576 votes
Idea sandbox Idea sandbox
Popular ideas Popular ideas
Ideas in development Ideas in development
Implemented ideas Implemented ideas
Idea #12618: Folder "id" to prevent broken thumbnails, databases, tags, etc...

Written by Yuzem the 27 Aug 08 at 21:48. Category: Graphics. Related project: Nothing/Others. Status: New
Rationale
****INTRODUCTION

I remember when I changed from windows to linux I decided to renounce to all the tags that I had in picasa.
It was a surprise to find out that all my tags were still there in linux. That is not the expected behavior, if you delete the config files all your settings should get lost but not if you move/rename a folder.

****OSX vs XP vs LINUX thumbnails:

If I am not mistaken, OSX and XP store thumbnails in the same folder where the pictures are while Linux have a special folder for all the thumbnails.

In Linux if you rename or move a folder with pictures inside all thumbnails have to be rebuild again leaving behind lots of broken thumbnails. Also applications that keep track of files and allows to tag them lost their tags.
Regarding thumbnails, in OSX and XP that doesn't happen.

****THE IDEA:

My idea brings together the best of OSX, XP and Linux. With the plus of been useful to other applications too. Tags will not get lost and thumbnails will not be broken when renaming or moving folders at the price of storing one tiny, tiny, very tiny file in contrast to OSX or XP that store the thumnails.

I know that nautilus renames the thumbnail when you move or rename a picture, thunar doesn't and it doesn't work if you rename or move the folder. With this idea there is no need to add support in any application, only in the thumbnailer itself, and it will work for all other applications, file browsers, picture viewers etc...

****HOW IT WORKS:

For example: You open a folder (~/Desktop/photo_album_1) and thumbnails are created as usual. Also a file named ".id" (just an example) is created in the same folder where the pictures are.
The file contains:
pic-thumbnailer = 0007aa92d9925ab287c0a31eae141742

pic-thumbnailer is the name of the application and the number is the path (~/Desktop/photo_album_1) encoded.

Now you move the folder to "~/Pictures" (~/Pictures/photo_album_1).
Then, you open the folder and the thumbnailer starts to do his job again. First it compares the actual folder (~/Pictures/photo_album_1) encoded with the one in the ".id" file. If it doesn't match it will find the previous created thumbnails, rename them and update the ".id" file.
Thats all!
It requires a little modification to the freedesktop standard regarding the names of thumbnails. It should be: "$encodedpath-$encodedname.png"

Other applications could take advantage of this, for example a music manager or a picture manager that allows to tag and to set ratings. They only have to add:
music-managerX = 0007aa92d9925ab287c0a31eae141742
picture-managerX = 0007aa92d9925ab287c0a31eae141742

The Advantages are many:
Less broken tags.
Less broken thumbnails.
To rebuild the thumbnails fewer times implies less disk usage (read/write) and space usage and less cpu usage.

****FINAL WORDS

I don't have many expectation that this get implemented since it implies a change of the standards. I do think that a different implementation is needed.
That all the thumbnails get broken and get left there taking disk space if you rename a folder for all pics in that folder and all sub folders is not very efficient.

Another solution could be naming the thumbnails with the picture inode + size in bits + modification time in seconds.

I am not sure about that...

25
votes
up equal down
Solution #1: Auto-generated solution of idea #12618
Written by Yuzem the 27 Aug 08 at 21:48.
Ubuntu Brainstorm was updated in January 2009. Since the idea #12618 was submitted before this update, its rationale and solution are not separated. Please vote accordingly, and if you have the necessary rights, please separate the rationale from the solution. Thanks!

Propose your solution

Attachments
No attachments.


Duplicates


Comments
mikaelstaldal wrote on the 28 Aug 08 at 08:50
Store the thumbnails in Extended Attributes instead, that would solve the problem.

Xyem wrote on the 28 Aug 08 at 09:35
If someone creates an archive of a directory and then sends it to someone, it is annoying to find 'thumbnails.db' in there ( when the source is XP ) taking up space when I can't use it ( unless there is a file manager that can use thumbnails from the 'database' ).

Likewise, it would be equally annoying ( though taking less space ) to extract an archive from a Ubuntu machine and finding a '.id' file that can't be used ( not running Ubuntu for example ).

Could this not be done by the directory inode+filesystem id?

MighMoS wrote on the 28 Aug 08 at 15:20
Thumbnails should be in ~/.cache as per Freedesktop specifications (thumbnails are not required for operation, and should be excluded from backups, etc), but the reporter is right in that renaming/moving a folder shouldn't make nautilus forget about it.


Post your comment