Jump to content
TNG Community
Hanne

Mod 'Unused Media', to many images and some SQL?

Recommended Posts

Hanne

Hello there

I'm not sure if this is the correct forum, but I use it because Rob mentioned "There is also a mod called Unused Media"  , which I will try, and that maybe solves my problem:

I wrote the following in another (wrong) forum:

"Maybe this is not the correct ticket, but I hope Rob is here some day, or please tell if I should open a new ticket:)

I hope the follow nerd like issue makes sense, and I hope, someone can help:

Suddenly I have 1.205 posts in the tng_media table. I don't know where they come from, but I think a lot of them arose when I created thumbnails (again). I guess that was a mistake. I have no idea which number will be the correct one.

If you look here: https://tng.stegemueller.dk/browsemedia.php you'll see, that a lot of them are unlinked. I really don't understand it. Of course I have never uploaded images, that are not related to an individual/a family.

When I look into tng_medialinks I only have 376 posts...Using logical thinking, this could be the correct number of media?

When I study tng_media I see, that a lot of the newer/latest posts (exactly 908) have no value in the column 'gedcom', and have a a value in 'thumbpath'. Could this be an explanation to the many unlinked media? SELECT * FROM `tng_media` WHERE `gedcom` NOT LIKE 'HBS'

297 posts have the value HBS in the column 'gedcom', and HBS is always the name of my gedcom-file. SELECT * FROM `tng_media` WHERE `gedcom` LIKE 'HBS'

I have tried to do some simple SQL expressions in order to fill out gedcom column with 'HBS' (after backup 😎), to see if this would solve the problem,  but I did not succeed as  I know nothing about SQL.

Can anyone help?"

Best regards,
Hanne

Share this post


Link to post
Share on other sites
Hanne

Hello

I have spent some hours analysing trying to find out the mess I have created:

Here is what I did:

1) Deleted ALL thumbnails so that they do not 'distrub'. I can easily generate them again.
2) Downloaded all 916 images from the photos folder to my desktop.
3) Installed the mod 'Unusaged media'. It only found 4 files present in the media folders on the server but not registered with TNG. So that is not my problem.
4) Found a folder on my HD with more than 1.200 images.
5) In Legacy I have 1.349 images - but that is probably a bit to many. Some are duplicates. But it is better to have to many than to few.

***
My conclusion is: The correct number is between 916 and 1.205. I really still believe that the 1.205 in TNG is the valid number.

The question still is: Why are they not linked any more?

***
I learned: 'thumbpath' in tng_media is information about the name, it will become, when it is generated, not an indication that the thumbnail does allready exist.

Best,
Hanne

 

 

 

 

Share this post


Link to post
Share on other sites
Hanne

I have found out my self! 😎

The issue starts all ready in Legacy, where only 291 images are linked to persons. The rest are so to say left overs and copies of copies.... This also means, that the correct number is 376 from tng_medialinks (one image can be linked several times). This is exactly the same result I get in Legacy, when I build a 'Mulitimediafilstier' (don't know the English term). Oh my God I have spent much time with this issue.

In TNG: Now I just needed to delete all images, that were not linked. That could be done from frontend.

 

 

Share this post


Link to post
Share on other sites
Rob Severijns

Hi Hanne,

Good to see you got it fixed 😀

At least you won't likely forget how to fix it next time and others can benefit from your solution too.

Rob

Share this post


Link to post
Share on other sites
Hanne

Hi Rob

Thanks! I'm very proud of myself 😎

Have a nice weekend.

../Hanne

Share this post


Link to post
Share on other sites
Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×