Jump to content

TMDB Corrupt Image Fix Plugin for Windows 10


mickle026

Recommended Posts

I ran v16, it took a few stop and restarts to get to 46217 people scanned, and seemed to stop on the last person. But it never downloaded new images or fixed the corrupt ones.

Log after many scans:, the corrupt number never seemed to decrease.

Found 46217 Movie/Series People entires
44972 Image links found
2361 were corrupt or old links
19210 links were not tmdb links
18914 links are local links
26058 links are not local links

Link to comment
Share on other sites

tmb4016

Hi,

I am seeing some strange behaviour with running this ... It is creating another folder called library at a directory above my metadata folder in my custom imagesbyname folder ...

so for example if my customimagesbyname folder is 

\\computername\Media\Media Browser\ImagesByName2 for example normally all my images are stored in the metadata subfolder of this directory.

i.e. \\computername\Media\Media Browser\ImagesByName2\metadata\library.

When I run the fix it creates a series of folders below 

\\computername\Media\Media Browser\ImagesByName2\library.

Prior to running the tool the local image strings in the database are set to 

%MetadataPath%\library\etc

after running some image are set to 

\\computername\Media\Media Browser\ImagesByName2\library\etc

It appears emby always adds the metadata directory on to the custom imagesbyname folder but the fix does not.

Has anybody else seen this ?

In emby it all looks fine but actually the structure of the imagesbyname folder has changed and the mages are in to different directories.

Link to comment
Share on other sites

mickle026
18 hours ago, tmb4016 said:

Hi,

I am seeing some strange behaviour with running this ... It is creating another folder called library at a directory above my metadata folder in my custom imagesbyname folder ...

so for example if my customimagesbyname folder is 

\\computername\Media\Media Browser\ImagesByName2 for example normally all my images are stored in the metadata subfolder of this directory.

i.e. \\computername\Media\Media Browser\ImagesByName2\metadata\library.

When I run the fix it creates a series of folders below 

\\computername\Media\Media Browser\ImagesByName2\library.

Prior to running the tool the local image strings in the database are set to 

%MetadataPath%\library\etc

after running some image are set to 

\\computername\Media\Media Browser\ImagesByName2\library\etc

It appears emby always adds the metadata directory on to the custom imagesbyname folder but the fix does not.

Has anybody else seen this ?

In emby it all looks fine but actually the structure of the imagesbyname folder has changed and the mages are in to different directories.

 

I will look at it, I can see where its happening in my code.

I am currently rewriting the plugin as a more useful general plugin rather than a slighly modded fix I wrote for myself and decided to share.

 

Link to comment
Share on other sites

tmb4016

hi - ok great thanks for the update. Glad to know it is not my setup that was at fault as everything else works ok.

Other than that the tool is working fine and I can fix the resultant issue manually with tweaks to the database ... but not everybody would be happy doing that.

Thanks again for your work.

Link to comment
Share on other sites

mickle026

current setup is this
 

If Default:

 InternalMetapath + "\\library\\" + GUUID.Substring(0, 2) + "\\" + GUUID;

If custom:

CustomMetapath + "\\metadata\\library\\" + GUUID.Substring(0, 2) + "\\" + GUUID;

 

So its the Custom one thats wrong?

Edited by mickle026
Link to comment
Share on other sites

tmb4016

Hi, Apologies for the late reply...

It depends on the values of CustomMetaPath and InternalMetaPath in the above line  ?

I would say that the issue is more to do with actually writing the custom path or internal path into the field at all. 

When I look at the mediaitems table for the people the path for the image does not actually hold the path itself it uses the variable %MetaDataPath% 

I assume this is so the custom image folder can be relocated and the images would then resolve correctly if the custom path was modified. By writing the path directly into the images attribute this would not work on custom image folder relocation.

In addition it looks like the %MetaDataPath% always appends the 'metadata' folder to the end on the Custom Image location in the settings.

As an example ....

My Settings for the Custom images location is \\<computername>\Media1\Media Browser\ImagesByName2

Held Correctly by Emby 

Images attribute value in db is  %MetadataPath%\library\aa\aa155a95e93e42a9af645694d432c0ff\folder.jpg*636841285982339438*Primary*0*0*null

Actual location of File is \\<computername>\Media1\Media Browser\ImagesByName2\metadata\library\aa\aa155a95e93e42a9af645694d432c0ff

If your tool downloads the image those values become ...

Images Attribute in database - \\<computername>\media1\Media Browser\ImagesByName2\library\aa\aa155a95e93e42a9af645694d432c0ff

Actual Location of the File - \\<computername>\media1\Media Browser\ImagesByName2\library\aa\aa155a95e93e42a9af645694d432c0ff

This is what I see anyway. Maybe somebody else can confirm ? @Happy2Play maybe ?

Hope this helps.

Link to comment
Share on other sites

Happy2Play

After looking at my system with a custom metadata path, yes there is something strange happening.  Deleted the folder in the wrong location and running a test again.

Don't see any issue on default setup.  Setup with custom path Y:\Emby created folder in Y:\Emby\library instead of Y:\Emby\metadata\library.

I hit save on the Dashboard-Library-Advanced again and running the plugin again.  It appears to be touching all the proper Y:\Emby\metadata\library\xx\xxxxxxxxxxxxxxxxxxx folders now.  Will follow up when task finishes.

 

I don't know code but it is like the initial interpretation of the path is wrong until user hits save on Dashboard-Library-Advanced.

 

Task has been running for 8 hours and still using the proper path after hitting Save above.

 

Edited by Happy2Play
status update
Link to comment
Share on other sites

tmb4016

Hi - I did not try resaving the custom Path - I will give it a go and seem if it makes any difference.

Happy2Play - Even when the images are in the right disk location what does the database entry say for images. All my emby standard images use the %MetadataPath% variable in the actual field. The ones from the Fix tool have the path actually written in as a UNC path - whilst it works it is not a flexible for relocation of the ImagesByName folder from the settings which I assume is why Luke uses the variable %MetaDataPath%.

 

Link to comment
Share on other sites

  • 3 weeks later...
wakeboarder141
11 minutes ago, Luke said:

Hi, run what exactly?

The plugin to fix the corrupt actor images. 

Link to comment
Share on other sites

neik
6 hours ago, Luke said:

Hi, run what exactly?

 

6 hours ago, wakeboarder141 said:

The plugin to fix the corrupt actor images. 

Apparently a plugin needs to do the work you guys are not willing to do or to fix.
It's really a shame there still is no solution from the Emby Devs for this issue - after months!

  • Like 1
Link to comment
Share on other sites

Keep in mind this is contributed by a user who likely doesn't have a Synology to test against.

Link to comment
Share on other sites

levander

I just want to report my case that could maybe be helpful to someone somehow. I also would like to test the plugin but I would like to clear up this first: 

In the first post you say the plugin deletes corrupted/dead link of the image and then it downloads new one and refreshes...

What I noticed in my Mac installation is that when I manually edit/delete blank/corrupted people’s image on detail screen new image immediately shows up in it’s place. So it doesn’t seem like it downloads it but more it seems like removed black image reveals the tmdb image. That is just my impression. I also want to point out that I use another software to scrape combination of  tmdb/imdb metadata before I import it to emby. So in my case (I can just guess) nfos already contain correct image links for actors but corrupted image links in emby database are “blocking” then until I simply remove them...

Link to comment
Share on other sites

neik
1 hour ago, cayars said:

Keep in mind this is contributed by a user who likely doesn't have a Synology to test against.

If this was intended for me:

This was by no means a criticism against the plugin but the way this has been (or not) handled by the Devs.

Link to comment
Share on other sites

Happy2Play
5 hours ago, levander said:

I just want to report my case that could maybe be helpful to someone somehow. I also would like to test the plugin but I would like to clear up this first: 

In the first post you say the plugin deletes corrupted/dead link of the image and then it downloads new one and refreshes...

What I noticed in my Mac installation is that when I manually edit/delete blank/corrupted people’s image on detail screen new image immediately shows up in it’s place. So it doesn’t seem like it downloads it but more it seems like removed black image reveals the tmdb image. That is just my impression. I also want to point out that I use another software to scrape combination of  tmdb/imdb metadata before I import it to emby. So in my case (I can just guess) nfos already contain correct image links for actors but corrupted image links in emby database are “blocking” then until I simply remove them...

Sorry no they are irrelevant, Emby does not use these nfo fields.  They are only there for Kodi.

Link to comment
Share on other sites

levander
1 hour ago, Happy2Play said:

Sorry no they are irrelevant, Emby does not use these nfo fields.  They are only there for Kodi.

Oh, ok, I’m glad because I don’t want those to mess up anything anyway.

Link to comment
Share on other sites

tomnjerry74

As another Synology user, I would love to see a solution to this problem as well. While it's entirely understandable that the OP of this plugin may not have the means to develop it to work on Synology systems, one can hope that the actual Emby team is working on a true fix. My libraries are plagued with blank, corrupt people and it isn't ideal to say the least.

Edited by tomnjerry74
Link to comment
Share on other sites

aptalca

Trying to get this to work. I have the following:

2020-07-11 23:51:20.982 Info FixerService: --------------- CORRUPT PEOPLE IMAGES COUNT--------------------
2020-07-11 23:51:20.983 Info FixerService: --------------- Found 101937 Movie/Series People entires
2020-07-11 23:51:20.983 Info FixerService: --------------- 99074 Image links found
2020-07-11 23:51:20.983 Info FixerService: --------------- 15273 were corrupt or old links
2020-07-11 23:51:20.983 Info FixerService: --------------- 38129 links were not tmdb links
2020-07-11 23:51:20.983 Info FixerService: --------------- 37364 links are local links
2020-07-11 23:51:20.983 Info FixerService: --------------- 61710 links are not local links
2020-07-11 23:51:20.983 Info FixerService: -------please note some old links might still work ----

I start the job, and it starts logging the following:

2020-07-11 22:30:13.868 Info FixerService: ------ Scanning Actor '37' from ' Doctor Sleep '- (19466 People in 2863) Movie/Series Records ----
2020-07-11 22:30:13.868 Info FixerService: Primary image Path : /config/metadata/library/a8/a801a30757054013a27824d4c4cb2b4d/folder.jpg
2020-07-11 22:30:13.872 Info FixerService: File Not Corrupt
2020-07-11 22:30:13.872 Info FixerService: ------ Scanning Actor '38' from ' Doctor Sleep '- (19467 People in 2863) Movie/Series Records ----
2020-07-11 22:30:13.872 Info FixerService: Primary image Path : /config/metadata/library/90/90190623cdfe4f6cbb7bab3b079fad86/folder.jpg
2020-07-11 22:30:13.877 Info FixerService: File Not Corrupt
2020-07-11 22:30:13.877 Info FixerService: ------ Scanning Actor '39' from ' Doctor Sleep '- (19468 People in 2863) Movie/Series Records ----
2020-07-11 22:30:13.877 Info FixerService: Primary image Path : https://image.tmdb.org/t/p/original/vsr0F5putQdlh0h8z7OvdAn1iKa.jpg
2020-07-11 22:30:14.875 Info FixerService: ------ Scanning Actor '40' from ' Doctor Sleep '- (19469 People in 2863) Movie/Series Records ----
2020-07-11 22:30:14.875 Info FixerService: Primary image Path :

As you can see, some links are tmdb, some are local paths and some are missing, as expected.

But every single time, it ends up stopping abruptly about some ways through (last time it went through about 19,471 before stopping, out of a total of 101,937)

It actually doesn't seem to have done anything because when I browse the movies whose actors were scanned, I still see wrong links for actor thumbs (also when I run the count job after a fix job stops, the corrupt or old link number is still the same).

I started the fix job several times over the last few days and every time it stops in a random spot the middle, but on a different entry. 

 

Any ideas?

Thanks

Edited by aptalca
Link to comment
Share on other sites

I'm seeing sort of the same thing only with larger numbers but it seems like it's not actually fixing anything.

Link to comment
Share on other sites

aptalca
14 hours ago, aptalca said:

Trying to get this to work. I have the following:


2020-07-11 23:51:20.982 Info FixerService: --------------- CORRUPT PEOPLE IMAGES COUNT--------------------
2020-07-11 23:51:20.983 Info FixerService: --------------- Found 101937 Movie/Series People entires
2020-07-11 23:51:20.983 Info FixerService: --------------- 99074 Image links found
2020-07-11 23:51:20.983 Info FixerService: --------------- 15273 were corrupt or old links
2020-07-11 23:51:20.983 Info FixerService: --------------- 38129 links were not tmdb links
2020-07-11 23:51:20.983 Info FixerService: --------------- 37364 links are local links
2020-07-11 23:51:20.983 Info FixerService: --------------- 61710 links are not local links
2020-07-11 23:51:20.983 Info FixerService: -------please note some old links might still work ----

I start the job, and it starts logging the following:


2020-07-11 22:30:13.868 Info FixerService: ------ Scanning Actor '37' from ' Doctor Sleep '- (19466 People in 2863) Movie/Series Records ----
2020-07-11 22:30:13.868 Info FixerService: Primary image Path : /config/metadata/library/a8/a801a30757054013a27824d4c4cb2b4d/folder.jpg
2020-07-11 22:30:13.872 Info FixerService: File Not Corrupt
2020-07-11 22:30:13.872 Info FixerService: ------ Scanning Actor '38' from ' Doctor Sleep '- (19467 People in 2863) Movie/Series Records ----
2020-07-11 22:30:13.872 Info FixerService: Primary image Path : /config/metadata/library/90/90190623cdfe4f6cbb7bab3b079fad86/folder.jpg
2020-07-11 22:30:13.877 Info FixerService: File Not Corrupt
2020-07-11 22:30:13.877 Info FixerService: ------ Scanning Actor '39' from ' Doctor Sleep '- (19468 People in 2863) Movie/Series Records ----
2020-07-11 22:30:13.877 Info FixerService: Primary image Path : https://image.tmdb.org/t/p/original/vsr0F5putQdlh0h8z7OvdAn1iKa.jpg
2020-07-11 22:30:14.875 Info FixerService: ------ Scanning Actor '40' from ' Doctor Sleep '- (19469 People in 2863) Movie/Series Records ----
2020-07-11 22:30:14.875 Info FixerService: Primary image Path :

As you can see, some links are tmdb, some are local paths and some are missing, as expected.

But every single time, it ends up stopping abruptly about some ways through (last time it went through about 19,471 before stopping, out of a total of 101,937)

It actually doesn't seem to have done anything because when I browse the movies whose actors were scanned, I still see wrong links for actor thumbs (also when I run the count job after a fix job stops, the corrupt or old link number is still the same).

I started the fix job several times over the last few days and every time it stops in a random spot the middle, but on a different entry. 

 

Any ideas?

Thanks

This time it stopped at 16,651

2020-07-12 01:07:48.931 Info FixerService: ------ Scanning Actor '3' from ' Creed '- (16646 People in 2863) Movie/Series Records ----
2020-07-12 01:07:48.931 Info FixerService: Primary image Path : https://image.tmdb.org/t/p/original/ghpZR17Z84Ck0HOmM3TrJCUInIx.jpg
2020-07-12 01:07:49.518 Info FixerService: ------ Scanning Actor '4' from ' Creed '- (16647 People in 2863) Movie/Series Records ----
2020-07-12 01:07:49.518 Info FixerService: Primary image Path : /config/metadata/library/2a/2ad4f4ec167d4953994373aeb494feba/folder.jpg
2020-07-12 01:07:49.522 Info FixerService: File Not Corrupt
2020-07-12 01:07:49.522 Info FixerService: ------ Scanning Actor '5' from ' Creed '- (16648 People in 2863) Movie/Series Records ----
2020-07-12 01:07:49.522 Info FixerService: Primary image Path : /config/metadata/library/ff/ff2c2a257663461a91ac79ec986cc81b/folder.jpg
2020-07-12 01:07:49.527 Info FixerService: File Not Corrupt
2020-07-12 01:07:49.528 Info FixerService: ------ Scanning Actor '6' from ' Creed '- (16649 People in 2863) Movie/Series Records ----
2020-07-12 01:07:49.528 Info FixerService: Primary image Path : /config/metadata/library/29/2967c26149594ce2bab7c1f800af3110/folder.jpg
2020-07-12 01:07:49.531 Info FixerService: File Not Corrupt
2020-07-12 01:07:49.536 Info FixerService: ------ Scanning Actor '7' from ' Creed '- (16650 People in 2863) Movie/Series Records ----
2020-07-12 01:07:49.536 Info FixerService: Primary image Path : /config/metadata/library/7c/7c99b96bfbec49bf94fd9c247832658d/folder.jpg
2020-07-12 01:07:49.540 Info FixerService: File Not Corrupt
2020-07-12 01:07:49.540 Info FixerService: ------ Scanning Actor '8' from ' Creed '- (16651 People in 2863) Movie/Series Records ----
2020-07-12 01:07:49.540 Info FixerService: Primary image Path : https://image.tmdb.org/t/p/original/5R21okoRhf3sjlHoN9EdCAltIdA.jpg

I'll open a new thread asking this to be fixed on emby's end since trying to display an old/wrong link from tmbd results in an emby error logged.

Link to comment
Share on other sites

  • 5 weeks later...
Dlarge

hi,

 

the plugin is hanging by me at this Actor. The actor picture is available for Katrina Law but the fixer is always stuck there.

Emby.thumb.PNG.494b15a24c28498ca08ef3e0a602767e.PNG

Edited by Dlarge
Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...