* Check for Unlinked Media

For users to report plugin bugs and request plugin enhancements; and for authors to test new/new versions of plugins, and to discuss plugin development (in the Programming Technicalities sub-forum). If you want advice on choosing or using a plugin, please ask in General Usage or an appropriate sub-forum.
User avatar
gerrynuk
Megastar
Posts: 565
Joined: 25 Apr 2007 09:21
Family Historian: V6
Location: Welwyn Garden City
Contact:

Check for Unlinked Media

Post by gerrynuk » 02 Oct 2012 11:52

Jane,

I have just downloaded this plugin (V1.0) and when I run it I get the following error message:

Image


ID:6505

User avatar
Jane
Site Admin
Posts: 8440
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Check for Unlinked Media

Post by Jane » 02 Oct 2012 12:52

Strange, that's just returning from the file list of the item is a file or a directory. Do you have any symbolic links in your media folder?

Any chance you can add a print at line 55 so you get and try running the plugin from the editor

Code: Select all

print(filename)
if attr.mode == 'file' then
and see if there is any thing different about the file it stops on.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

User avatar
johnmorrisoniom
Megastar
Posts: 882
Joined: 18 Dec 2008 07:40
Family Historian: V7
Location: Isle of Man

Check for Unlinked Media

Post by johnmorrisoniom » 02 Oct 2012 23:06

I have just tried the plug-in with no problems.
How would I 'tweek ' it so that I can Move suspect files to another folder, rather than delete them.

User avatar
Jane
Site Admin
Posts: 8440
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Check for Unlinked Media

Post by Jane » 03 Oct 2012 12:08

Please try this one I have added the Move Files, and trapped for the attribute problem

https://www.dropbox.com/s/3tngzbagv02f0 ... dia.fh_lua
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

User avatar
johnmorrisoniom
Megastar
Posts: 882
Joined: 18 Dec 2008 07:40
Family Historian: V7
Location: Isle of Man

Check for Unlinked Media

Post by johnmorrisoniom » 03 Oct 2012 12:59

Hi Jane,
New one works fine at listing the files, but I get an error when I try moving them.

Image

But the file is at the top of the list in the result set.

User avatar
Jane
Site Admin
Posts: 8440
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Check for Unlinked Media

Post by Jane » 03 Oct 2012 16:24

Ah I see what the problem is I have left the folder structure in and it does not exist in the folder you are moving to.

Can you try downloading it again, the link should be the same. V1.2
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

User avatar
johnmorrisoniom
Megastar
Posts: 882
Joined: 18 Dec 2008 07:40
Family Historian: V7
Location: Isle of Man

Check for Unlinked Media

Post by johnmorrisoniom » 03 Oct 2012 17:15

Thanks Jane,
V 1.2 worked very well, and renaming the files by adding the original path to the name is a good idea.

User avatar
Jane
Site Admin
Posts: 8440
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Check for Unlinked Media

Post by Jane » 03 Oct 2012 18:01

Thanks John,

I have released it to the plugin store, along side one to check for duplicate media records, where either they are linked to the same file or a file with identical content.

So perhaps you might like to give me some feedback on that one if you have a moment.

http://www.family-historian.co.uk/plugi ... try?id=273
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

User avatar
johnmorrisoniom
Megastar
Posts: 882
Joined: 18 Dec 2008 07:40
Family Historian: V7
Location: Isle of Man

Check for Unlinked Media

Post by johnmorrisoniom » 03 Oct 2012 19:30

On first run I got a message saying md5 required

Image

On clicking OK I got another error.

Image

and the run was aborted.

User avatar
Jane
Site Admin
Posts: 8440
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Check for Unlinked Media

Post by Jane » 03 Oct 2012 21:16

Ok, that's tied in with loading the md5 package. I'll have a look in the morning.


if you add require 'luacom' near the end on the line after require 'lfs'

and run it you will get an error, but if you then run it again it should work.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

avatar
roy
Silver
Posts: 7
Joined: 17 Nov 2002 12:53
Family Historian: None

Check for Unlinked Media

Post by roy » 03 Oct 2012 21:24

Jane
I have justdownloaded this plug in and it does not work for me as intended.
I do not get the option window but go straight to
'Do you want to delete 232 unlinked files?  etc.'

It wants to delete ALL of my multimedia files (they are all in fact linked).
Window 7.  Media in subfolders in Media folder.

I exported Gedcom file to a new project together with linked media.  (media now in MEDIA folder not subfolders - same number/media files as in original) and ran plug in again.   Still on option window, but said all files linked.

Roy

User avatar
johnmorrisoniom
Megastar
Posts: 882
Joined: 18 Dec 2008 07:40
Family Historian: V7
Location: Isle of Man

Check for Unlinked Media

Post by johnmorrisoniom » 03 Oct 2012 22:08

The extra line makes the plugin work, with the md5 message only appearing on first run.

It did crash when a broken link was found. But the file was in the unlinked media folder, so moved it back, and repaired the link. Ran the plugin again and found thirty sets of duplicates, half of which had different file names.

Very useful plugin.

User avatar
Jane
Site Admin
Posts: 8440
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Check for Unlinked Media

Post by Jane » 04 Oct 2012 09:51

Roy, Did your original project show the files in the media folder on the Work With External File Links or show the whole path.

If you could run the list option and save the result set for me I might be able to work out why it did not work along with a copy of the paths in the media records.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

User avatar
Jane
Site Admin
Posts: 8440
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Check for Unlinked Media

Post by Jane » 04 Oct 2012 12:53

Hi Roy,

I have done some experiments and am pretty sure the problem is you have media in the media folder linked using long path names.

Please try remapping all the media to the media folder using the Work With External File Links tool.

In the meantime I have modified the plugin to handle incorrectly mapped data, which I will upload to the plugin store later.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

avatar
roy
Silver
Posts: 7
Joined: 17 Nov 2002 12:53
Family Historian: None

Check for Unlinked Media

Post by roy » 04 Oct 2012 19:07

Hello Jane.
I think I have followed what you say, but I am unsure why this would mean I did not get the options or option window displayed.

As all the media is in the media folder, I am unsure how I could remap this.
Here are a few snips showing my folder structure etc.

Image
This is the list of files that would have been deleted:

ImageImage
Hope this gives some clues
Thanks

Roy

User avatar
johnmorrisoniom
Megastar
Posts: 882
Joined: 18 Dec 2008 07:40
Family Historian: V7
Location: Isle of Man

Check for Unlinked Media

Post by johnmorrisoniom » 04 Oct 2012 19:35

from what you are saying, you are still on vers 1.0 of the plugin, there is a updated version available which starts with an option screen to:

A: List
B: delete
C: Move

your files

User avatar
Jane
Site Admin
Posts: 8440
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Check for Unlinked Media

Post by Jane » 04 Oct 2012 20:02

As John says, try using the latest version. Also if you scroll down on the External links tool, do you have any files which show as the G: rather than in the Project folder?
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

avatar
roy
Silver
Posts: 7
Joined: 17 Nov 2002 12:53
Family Historian: None

Check for Unlinked Media

Post by roy » 05 Oct 2012 17:48

Jane
I think I have now identified the problem.

If I renamed the project it all worked ok.
I have now identified that the problem only occurs if there is a'-' in the project name.
My problem project has a hypnen. If I remove it, all is fine. That was the only change.
Easy once its found.

Roy

User avatar
Jane
Site Admin
Posts: 8440
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Check for Unlinked Media

Post by Jane » 05 Oct 2012 18:55

Thanks Roy, I'll add a fix when I get a minute.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

User avatar
Jane
Site Admin
Posts: 8440
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Check for Unlinked Media

Post by Jane » 05 Oct 2012 19:15

Please can you try 1.4, which is on the dropbox link and see if that works better with the hyphened file.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

User avatar
tatewise
Megastar
Posts: 27075
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Check for Unlinked Media

Post by tatewise » 05 Oct 2012 19:30

Jane, the following 'magic' pattern characters can all also appear in file names, and perhaps should be catered for just like hyphen (-):

Code: Select all

 ^ $ ( ) % [ ] + 
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
Jane
Site Admin
Posts: 8440
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Check for Unlinked Media

Post by Jane » 05 Oct 2012 20:04

Thanks Mike, I used the strPlainText function from the Search and Replace plugin.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

User avatar
tatewise
Megastar
Posts: 27075
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Check for Unlinked Media

Post by tatewise » 06 Oct 2012 09:21

Jane, your new Plugin Code Snippet Convert String To Pattern For Plain Text Searching should be merged with my original Plain Text Substitution Code Snippet.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
Jane
Site Admin
Posts: 8440
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Check for Unlinked Media

Post by Jane » 06 Oct 2012 15:33

Opps missed your one. I have deleted mine.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

User avatar
gerrynuk
Megastar
Posts: 565
Joined: 25 Apr 2007 09:21
Family Historian: V6
Location: Welwyn Garden City
Contact:

Check for Unlinked Media

Post by gerrynuk » 15 Oct 2012 12:27

Jane said:
Strange,  that's just returning from the file list of the item is a file or a directory.  Do you have any symbolic links in your media folder?

Any chance you can add a print at line 55 so you get and try running the plugin from the editor  

print(filename)
if attr.mode == 'file' then

and see if there is any thing different about the file it stops on.
Jane,

Sorry but I have only just found time to re-test the plugin. I downloaded the latest version (1.5) but still get an error message when I click on List Unlinked media:

Image

As you have updated the plugin since my first post is it still possible to run the test you describe?

Post Reply