Page 1 of 1
Testing for Check and Repair Media Links
Posted: 05 Oct 2012 09:24
by Jane
I have created a new plugin to check and try and fix problems with media links in a Project File as follows
- broken links with a search to find and copy the media to the media folder
- finds media outside of the media folder and copies it to the media folder
- media in the media folder, but listed with full paths are corrected to direct to the media folder
It first passes through the file looking for problems and then offers to fix them, if you say no it will simply list the problems for you.
When copying files in it prompts each file with in the media folder so you can choose a folder with it if you want.
It can be downloaded from:
https://www.dropbox.com/s/9jf8csn46vqzx ... nks.fh_lua
NOTE As this is new plugin and it makes changes to your Project data and media folder, please ensure you work on a copy and make a full backup before using it.
ID:6506
Testing for Check and Repair Media Links
Posted: 06 Oct 2012 13:49
by davidm_uk
Just tied running the plugin and immediately got error message:
Seems to be the same error as reported in the other topic 'Check for Unlinked Media'
David
Testing for Check and Repair Media Links
Posted: 06 Oct 2012 15:31
by Jane
I think I found that one, can you try downloading it again.
Same place.
Testing for Check and Repair Media Links
Posted: 06 Oct 2012 15:59
by davidm_uk
Thank you Jane, works fine now and found a few errors which I've now corrected.
[smile][smile]
Testing for Check and Repair Media Links
Posted: 07 Oct 2012 09:53
by Jane
Thanks David, I'll probably pop it in the Plugin Store later in the week.
Testing for Check and Repair Media Links
Posted: 25 Jan 2013 20:41
by mezentia
Hi Jane
I've just downloaded the latest version of your plugin, and it stops with the following error:
An error has occurred - plugin failed to complete
Line 82: C:UsersDavidAppDataLocalTemp~fhA809.tmp:205: attempt to index local 'attr' (a nil value)
No changes have been made to data records.
in the function buildfilelist()
Testing for Check and Repair Media Links
Posted: 28 Jan 2013 08:09
by Jane
Line 82 does not make sense to me as I look at the code, the only place attr is used is in the yield tree function which is line 289. Can you put a debug on line 295, and see if there is anything strange about the file it's on when it stops.
Thanks
Testing for Check and Repair Media Links
Posted: 28 Jan 2013 10:46
by tatewise
'attr' is also used on lines 327 & 328
local attr = lfs.attributes(strfromfile)
lfs.touch(strtofile,attr['modification'],attr['access'])
Testing for Check and Repair Media Links
Posted: 28 Jan 2013 11:31
by Jane
Mike, I think by the time it's got there it has already got the attr values once.
Testing for Check and Repair Media Links
Posted: 28 Jan 2013 19:29
by mezentia
Ooops [oops]
My apologies Jane, I posted in the wrong thread. The fault I got was with the Check for Unlinked Media, not the Check and Repair Media Links. Didn't spot the error until I tried to go to a non-existent line number! Check and repair media works ok

just some 400+ links to fix now.
Testing for Check and Repair Media Links
Posted: 28 Jan 2013 21:30
by tatewise
Not sure if it is the cause of the problem but in the two Plugins the function dirtree(dir) contain two slightly different versions of local function yieldtree(dir).
Testing for Check and Repair Media Links
Posted: 29 Jan 2013 17:59
by Jane
Sorry been to Wales today for work, but I will try and take a look tomorrow.
Testing for Check and Repair Media Links
Posted: 30 Jan 2013 08:42
by Jane
David please can you try
https://www.dropbox.com/s/3tngzbagv02f0 ... dia.fh_lua
I have changed it to use the same logic as the Repair version does.