Page 1 of 1
Plugin: Check for Unlinked Media
Posted: 15 Apr 2013 20:36
by gerrynuk
I have added a note to the page for this plugin on the Family Historian site asking if it is possible to amend the plugin to exclude the folders created by Picasa. At the moment all the Picasa thumbnails show up as unlinked media, which completely swamps the actual unlinked media.
Would anyone else find this useful?
ID:6898
Plugin: Check for Unlinked Media
Posted: 13 May 2013 16:36
by gerrynuk
I wonder if some kind person who is familiar with Lua programming could advise me how I could amend Jane's excellent plugin. I would like the search to exclude any folders called '.picasaoriginals' but don't know what code to use or where to put it!
Plugin: Check for Unlinked Media
Posted: 13 May 2013 16:54
by Jane
Do you know what version of Picasa creates those folders, I have it installed and don't have any folders with that name.
edit: To answer my own question, a google search shows it's where Picassa stores old copies of files you have edited. So you might actually be better to move the folders out of the project or just delete them.
Plugin: Check for Unlinked Media
Posted: 13 May 2013 17:49
by gerrynuk
I am using Version 3.9.16.37 for Mac.
Having carried out a little experimentation it appears that this version of Picasa will always create a folder called '.picasaoringinals' within the folder holding the image being edited. (I renamed the original folder but Picasa just created a new folder.) This means that there is an additional Picasa thumbnail for every edited image stored in an otherwise hidden folder. Your plugin indexes all these thumbnails and swamps the output with all the thumbnails which are not, of course, linked to FH.
Plugin: Check for Unlinked Media
Posted: 13 May 2013 23:02
by tatewise
Sorry to jump into this thread, but Gerry you could try the following edit to the Plugin.
Change the function buildfilelist() that starts on line 79.
Change line 86 if attr.mode == 'file' then as follows:
if attr.mode == 'file' and not filename:match('picasaoriginals\') then
This should exclude any file paths with folder names that end with 'picasaoriginals'.
[EDIT] Line numbers corrected!
Plugin: Check for Unlinked Media
Posted: 14 May 2013 08:10
by gerrynuk
Thank you very much, Tatewise, that works a treat.
Just one small point, the relevant code is on line 86 in my version which is v1.7
Plugin: Check for Unlinked Media
Posted: 14 May 2013 09:21
by johnmorrisoniom
As an aside to this. I always edit my media in a separate location to my projects, before copying them into a project.
If you work this way with picassa, you will not get the problem with the thumbnails in your project (which also increase the size of what's in the folders).
Plugin: Check for Unlinked Media
Posted: 14 May 2013 15:00
by gerrynuk
johnmorrisoniom said:
As an aside to this. I always edit my media in a separate location to my projects, before copying them into a project.
If you work this way with picassa, you will not get the problem with the thumbnails in your project (which also increase the size of what's in the folders).
Thanks for the tip. I just find it easier to put the images straight into the project and edit them before (or after) I link them to FH. It also means it is easy to check - using Jane's plugin - which images I have still to link. If the images were not in the project that option wouldn't be available without further amending the plugin.
Re: Plugin: Check for Unlinked Media
Posted: 21 Dec 2014 10:43
by gerrynuk
tatewise wrote:Sorry to jump into this thread, but Gerry you could try the following edit to the Plugin.
Change the function buildfilelist() that starts on line 79.
Change line 86 if attr.mode == 'file' then as follows:
if attr.mode == 'file' and not filename:match('picasaoriginals\') then
This should exclude any file paths with folder names that end with 'picasaoriginals'.
[EDIT] Line numbers corrected!
This modification was woking but having made the change to V1.7 of the plugin and tried to run it in FH Version 6 I am getting the following error message.

- Screen Shot 2014-12-21 at 10.41.30.png (19.82 KiB) Viewed 6497 times
Re: Plugin: Check for Unlinked Media
Posted: 21 Dec 2014 11:35
by tatewise
Gerry, the folder name should be 'picasaoriginals\\' with double backslash.
The same error message occurs in FH V5, so you must have worked out how to fix it yourself, from a similar example a few lines later.
The explanation is that backslash \ is an escape character.
It prefixes special cases such as \n = newline, \t = tab, \" = quote, \123 = character with code 123, etc.
So to obtain an actual backslash requires two \\ backslashes.
Whereas \' = apostrophe in the string, and there is no apostrophe to terminate the string.
Re: Plugin: Check for Unlinked Media
Posted: 21 Dec 2014 12:06
by gerrynuk
Thanks for that Mike. I don't remember having to add the second backslash but it is some time since I ran the plugin. Anyway, all seems to OK now.