Jump to content

Backup / Restore Actors - Beta with local or web based restore.


mickle026
Go to solution Solved by GrimReaper,

Recommended Posts

Yes exactly the same File.

The path exists up until

D:\Emby\metadata\library\9e\

The Folder

9e158806cb4d4935b5a930482cb20107

is missing.

 

As I said without knowing your code are you possibly only catching FileNotFoundExceptions? Instead of DirectoryNotFound?

 

I am C# developer myself albeit not for emby and have access to Visual Studio. So if this issue continues to behave strangely I could have a look at it and test myself, in case you are comfortable sharing your VS Project with me.

 

Edited by Qowy
Link to comment
Share on other sites

mickle026
9 hours ago, Qowy said:

As I said without knowing your code are you possibly only catching FileNotFoundExceptions? Instead of DirectoryNotFound?

 

The joys of being am amateur, not really a c# dev, still learning c# on the fly

Try this, added directory check and put it all in a try catch block to log the error and continue instead of stopping.

 

Edited by mickle026
Remove download
Link to comment
Share on other sites

ok this time It ran to completion, however it says:

Finished, Removed/Repaired (0) Person(s) - You might need to restart Emby Server.

And nothing changed.

 

Let's take a concrete example:

Sonequa Martin-Green

 

Your tool logs: 26.Feb.2022  -  13.45.44 Person (22760) Sonequa Martin-Green,D:\Emby\metadata\library\0d\0d8f330efca145eaa5f93033fd7070d4\folder.jpg

But that file does not exist.

What would I run to fix this?

 

Link to comment
Share on other sites

mickle026

Ok, so this is fixed now in my testing.  Please be sure to confirm it it is now working for you or not

It is now detecting empty folders/invalid folder paths/missing files/bad urls/bad files .

Earlier build missed something crucial as I was in a hurry, sorry.  Removed the restart server message as you dont need to do that.

Now logging detected image link before attempt to fix, and after fix applied as a visual validation.

I would like to thank you for the feedback, it has helped me understand the issue your were having and allowed me to incorporate extra measures to allow for this, which in turn will help others, and it has made me take another look and address issues that crash the function.  So thank you @Qowy.

1757186224_Screenshot2022-02-26at22-04-25Emby.png.40e6ec129cb7b984f248f2c4b000ba5f.png

The top log is all the actors with their associated file paths or urls
 

747997984_Screenshot2022-02-26at22-06-12Emby.png.e6fea72ab32ece916d2d481ff75717c9.png

The bottom log is a report of actions taken by the plugin

 

587390332_Screenshot2022-02-26at22-07-36Emby.png.c413ea908bfa9247bf2d445f5c464004.png

 

I deleted the folder.jpg but left the path in this example which was the last error you had thrown.

 

 

Edited by mickle026
Link to comment
Share on other sites

They are back to the white "missing" icon. I am running a refresh now. So far they only show up after clicking on the actor and then going back again. Will see if this will fix itself after some time,.

Link to comment
Share on other sites

mickle026
25 minutes ago, Qowy said:

They are back to the white "missing" icon. I am running a refresh now. So far they only show up after clicking on the actor and then going back again. Will see if this will fix itself after some time,.

Mine replaced after running refresh metadata.  Until I did that it was the same as yours, only clicking them replaced them.

 

Glad they are back to normal though as that will allow them to work again instead of being "stuck" not working

Edited by mickle026
Link to comment
Share on other sites

mickle026

Todays update to simply adds Purging (Deleting) Log files

Now you can delete all logs, or just CustomProvider made logs.

*Note if you choose to delete them all the embyserver.txt & any files in use will not be deleted, however the if they are not in use like the hardware log they will be deleted.

2008663648_PurgeLogFiles.png.2bfc0fec509f4e98423ce2fbf43aa570.png

 

CustomProvider.zip

Screenshot 2022-02-27 at 12-38-18 Emby.png

Edited by mickle026
Link to comment
Share on other sites

mickle026

Added export to media folders ".actors" folder. (Backup Tab)

Currently export is only MOVIE types and not for Series or Episodes, this will come later.

So now you have import people to Actor Cards for (Movie and Series/TV Shows) and export People from (Movies) to the \media folders\.actors\ folder on this function

Un Checking the Overwrite backed up images will stop files existing being overwritten.  Example shown has missing images hence only 13 of 18 written.

NOTE: I have not removed images from the temporary file cache either yet.

 

The export (Backup Tab)

87940156_Peoplebackupto.actors.png.df07683f5e9d46ea7569e119f357f74c.png

 

Internet urls are downloaded and written there too.

2034047241_Exportto.actorslog.jpg.e51827f33789c2433c39a13694e2dcc3.jpg

 

The import (Repair Tab)

1161685518_Screenshot2022-02-28at01-04-07Emby.png.6735cc18304e224841612893d4982747.png

 

 

Edited by mickle026
  • Like 2
Link to comment
Share on other sites

mickle026

Todays update, brings backing up Series and Episode actors to the \.actors folders inside your media directories.

I have done a backup ALL , or your can backup individually.

 

596391348_Screenshot2022-02-28at23-32-30Emby.thumb.png.9fb1741b6185ad209a13458ccc85d491.png

 

The ALL will do all Movies, Series and Episodes

Whats the difference between Series and Episodes?

Well the difference is that some people (cast members) in Episodes are not main cast members so do not appear in the series entry!  The Episode backup allows you to capture more people for this series than series alone.

Why seperate?

That is because you may only wnat to do certain libraries or even certain people - user has the choice...

 

 

CustomProvider.zip

  • Like 1
Link to comment
Share on other sites

GrimReaper

Does exporting overwrite present images in .actors subfolder? 

Disregard, you already explained it in helper text. Great stuff. 👍 

Edited by GrimReaper
Fineprint really should be read
Link to comment
Share on other sites

mickle026
31 minutes ago, GrimReaper said:

Does exporting overwrite present images in .actors subfolder? 

 

I use where the Overwrite = true, Overwrite = false set by the checkbox at the top of the backup page.  ( I need to fix the typo I just spotted!)

1812903206_Screenshot2022-02-28at23-50-41Emby.png.3049a5633fbc74d10c6cee1dcc16ffe9.png

File.Copy(CastImage, CopyTo, Overwrite);

Overwrite keyword is true or false, set by the checkbox
  ie File.Copy(EmbyImage, BackupPath, True or False);

So it shouldn't, but as this is an Alpha release, it will need testing on a test server first.  Don't do this yet on your main library if you are worried. (Im not responsible if you do!)
It should only overwrite is set to do so, and should still overwrite if set to and even if destination file exists and is read only.

 

This isn't fully tested yet for that, only tested for actually exporting properly.

 

 

Edited by mickle026
Link to comment
Share on other sites

GrimReaper

That's great, as I would actually like it to overwrite, keeping the images updated over years once replaced within Emby. 

Link to comment
Share on other sites

mickle026
12 minutes ago, GrimReaper said:

That's great, as I would actually like it to overwrite, keeping the images updated over years once replaced within Emby. 

I think the only reason that they might not overwrite if set to do so in some circumstances might be down to "ownership" on linux based or btrfs sytsems such as a NAS, but that will log as a failure so you could investigate that.   Thanks to feedback from @Qowy I have now learned how to continue from these types of errors.

Edited by mickle026
  • Thanks 1
Link to comment
Share on other sites

mickle026

I guess that I have now inadvertantly (by accident) created a full backup and restore function!  That wasn't the intention of this plugin but it seems that it has happened.

The intention of this plugin is to create a backup and retrieval from a http server via Custom Provider fetcher in library settings incase of server reinstall!

1.  Backup to .actors, from Emby and Web links.
2.  Repair People to Emby from .actors folders.

This should therefore localise all links and remove weblinks from Emby for people, something else to test by doing this and then running a Get Actor Links and Urls report!

 

Link to comment
Share on other sites

mickle026

I have found an error that I made in the backup to .actors, where some images didnt backup under certain conditions.

I have fixed that so will be in the next release

Link to comment
Share on other sites

GrimReaper

Shouldn't the red line of text be placed below Section header?

1105088582_Screenshot2022-03-07185330.thumb.png.d3e33a9975eedd630e75f5a614850866.png

 

And what does the text in green mean in this context, Series Actors Backup?

Link to comment
Share on other sites

  • Solution
GrimReaper

Following same analogy, shouldn't there be a section Movies Actors Backup below Movie Backup?

1043163132_Screenshot2022-03-07190114.thumb.png.0b834953a86c5448dde2606b5a58d81b.png

 

Link to comment
Share on other sites

mickle026

I do see what you mean, thanks

As this plugin is being developed, and to be fair it wasnt even meant to be released yet (and its not even the same one as this thread started, I abandoned that one).  Things are getting moved about and redesigned.  The plugin you have has 12 or 13 tabs.  I have already condesed that down to 10, and still working to improve stuff. 

The current version doesnt support the scrapers yet as even that area is being redesigned/coded.

It is essentially a prototype, rough and ready, being moulded into something useful.

I'll update as soon as I can.

Edited by mickle026
  • Like 1
Link to comment
Share on other sites

mickle026

Just an update of where I am with this.  It is still very much in progress.

I have done quite a lot, although it probably doesn't look like much at first.
 

Since 28th feb post

11.03.2022
*More GUI layout redesign (still work in progress)
*Added Discogs scraper for Artist Images

10.03.2022
*Fixed multiple errors
*More GUI layout redesign (still work in progress)
*Added Discogs scraper for Single/Track Cover Images
*Added 'ScraperCache' option to download search images to metadata (more info on this later)
*Added Global Settings to Scrapers with Log http response errors.

04.03.2022
*Fixed an Error in Backup Albums
--Backup Folders 'MusicBrainzAlbum' and 'AudioDbAlbum' require manual deletion and Backup>Albums re-running.
*Rewrite Fetcher for Albums
*Moved Album fetcher Logging to own Log
*Dissabled all web scrapers (for now)
*Dissabled contact other Emby web servers (for now)
*More re-organisation of Web gui (still in progress)
*Added Album/Primary Path report
*Added Enable/Dissable servers checkboxes in global config

03.03.2022
*Rewrite Fetchers (Artist/Person/Series/Episode)
*Start of Web Page Gui Redesign.
*Start of Implimenting Metadata Interfacing.
*More logging taken away from embyserver.txt (Still in progress)

I haven't re-enabled all the scrapers yet.  But I have implimented a new one for MusicArtists and MusicTracks(Songs)

1606333902_Screenshot2022-03-11at21-11-08Emby.thumb.png.c2d08e23a041ad28786a420a4ea73529.png

 

And for tracks (Adele - Hello)

147914180_Screenshot2022-03-11at21-11-50Emby.thumb.png.2ad184f863bc2dcc1c83b51e6aa179c1.png

 

I have also enabled an image cache

1729574835_Screenshot2022-03-11at21-15-22Emby.png.165f511786f6df9b4b0627afde1d6bbd.png

If this is not set but enabled it will write the Cache folder to your metadata path and store them there.  These images are not currently used, but might be in the future.  This is a function that might be handy to some people

510126171_Screenshot2022-03-11at21-27-32Emby.thumb.png.fb463daea42acd78a355f2c97888dc66.png

And On the Disk Drive

Capture.thumb.JPG.a173160f25df59bf5feb45bdbf6eef46.JPG

There still lots and lots of work to be done.  But here is where I am at so far.

If your config doesnt load check the spelling (case) of the dll againt the config xml file.  I had to rebuild the build file, not sure if its exactly the same.

 

 

I also update a lot to media-and-meta.com (for custom provider server)

Music Track Database contains
11311  Track Cover(s)
29  Backdrop Image(s)
3  Logo Image(s)

Person Database contains
53289 Person Portrait Images(s)

TV Show / Series Database contains
471  Cover(s)
85  Artwork Image(s)
828  Backdrop Image(s)
433  Banner Image(s)
342  Logo Image(s)
258  Thumb Image(s)

 

Direct search on the website doesn't really work.  It works best by adding it as a Custom Provider server
1162463054_Screenshot2022-03-11at21-46-08Emby.png.52123ab2cea23a7a1ac5c2e29ac7f077.png

 

You can now turn servers on and off without having to delete them

TV Show Library

2030390617_Screenshot2022-03-11at21-49-02Emby.png.d01be6b29a8494112d293c74e0117d27.png

Music Library

 

2001577386_Screenshot2022-03-11at21-50-34Emby.png.0b2419bfc4634e562aea2c62188b365d.png

 

 

Edited by mickle026
  • Like 1
Link to comment
Share on other sites

mickle026

Added Backup & Restore LiveTV Timers as this is simple and seems to be something that might come in handy to some users.

The locations are the same backup location used in the Global Config.

1409891760_Screenshot2022-03-12at03-28-04Emby.png.9f12e4bdf04f72d1e2e92b80d082f413.png

 

 

1130528483_Screenshot2022-03-12at03-24-18Emby.png.26d60be4ab9415554cea29232e9fa0d3.png

 

 

Edited by mickle026
  • Like 1
Link to comment
Share on other sites

TallBoiDez
On 3/11/2022 at 10:14 PM, mickle026 said:

Added Backup & Restore LiveTV Timers as this is simple and seems to be something that might come in handy to some users.

The locations are the same backup location used in the Global Config.

1409891760_Screenshot2022-03-12at03-28-04Emby.png.9f12e4bdf04f72d1e2e92b80d082f413.png

 

 

1130528483_Screenshot2022-03-12at03-24-18Emby.png.26d60be4ab9415554cea29232e9fa0d3.png

 

CustomProvider.zip 3.26 MB · 3 downloads

this version of the plugin Didn't appear in my plugin list on emby, I reverted back to the last version and it is showing up just fine.

Link to comment
Share on other sites

mickle026
7 hours ago, TallBoiDez said:

this version of the plugin Didn't appear in my plugin list on emby, I reverted back to the last version and it is showing up just fine.

CustomProvider.zip

Sorry my fault.  Wrong nuget on build (add-in for the build).  I used the first stable release for the stable, but it was an older one that i needed.

Link to comment
Share on other sites

Spegeli

I have the problem that some actor images only appear after you click on them thats why i tried your plugin because of the actor functions:


I had "Total: 100461 Missing Image(s)" and then i did a Force Actor Images, after that it was "Total: 99685 Missing Image(s)".
So some images found but a lot still missing and that although there are pictures on IMDB or TMDB:
 

When i click manuell on it, your Plugin still stay its no image available but the internal emby functions seems to found one: 
 

19.Mar.2022  -  12.32.42 PersonName: Guo Jingfei
19.Mar.2022  -  12.32.42 TVDB:  IMDB: nm3530937 TMDB: 1353688
19.Mar.2022  -  12.32.43 CustomProvider Server (IMDB) Primary Doesn't Exist for Guo Jingfei
19.Mar.2022  -  12.32.43 CustomProvider Server (TMDB) Primary Doesn't Exist for Guo Jingfei
19.Mar.2022  -  12.32.44 CustomProvider Server (PersonByName) Primary Doesn't Exist for Guo Jingfei
19.Mar.2022  -  12.32.44 Search Completed.

https://www.imdb.com/name/nm3530937/

https://www.themoviedb.org/person/1353688-guo-jingfei

2022-03-19 12:32:41.980 Info HttpClient: GET https://api.themoviedb.org/3/person/1353688?api_key=x_secret1_x&append_to_response=credits,images,external_ids&language=de
2022-03-19 12:32:42.145 Info App: MovieDbPersonProvider metadata is incomplete for language de. Trying English...
2022-03-19 12:32:42.279 Info HttpClient: GET https://api.themoviedb.org/3/person/1353688?api_key=x_secret1_x&append_to_response=credits,images,external_ids&language=en
2022-03-19 12:32:44.233 Info HttpClient: GET https://image.tmdb.org/t/p/original/xNyi4uOHKAqCgW7JhV5MPn5BG88.jpg

 

 

 

19.Mar.2022  -  12.35.30 PersonName: Liu Tianzuo
19.Mar.2022  -  12.35.30 TVDB:  IMDB: nm3602259 TMDB: 589906
19.Mar.2022  -  12.35.31 CustomProvider Server (IMDB) Primary Doesn't Exist for Liu Tianzuo
19.Mar.2022  -  12.35.31 CustomProvider Server (TMDB) Primary Doesn't Exist for Liu Tianzuo
19.Mar.2022  -  12.35.32 CustomProvider Server (PersonByName) Primary Doesn't Exist for Liu Tianzuo
19.Mar.2022  -  12.35.32 Search Completed.

https://www.themoviedb.org/person/589906-tianzuo-liu

https://www.imdb.com/name/nm3602259/

2022-03-19 12:35:29.911 Info HttpClient: GET https://api.themoviedb.org/3/person/589906?api_key=x_secret1_x&append_to_response=credits,images,external_ids&language=de
2022-03-19 12:35:30.161 Info App: MovieDbPersonProvider metadata is incomplete for language de. Trying English...
2022-03-19 12:35:30.211 Info HttpClient: GET https://api.themoviedb.org/3/person/589906?api_key=x_secret1_x&append_to_response=credits,images,external_ids&language=en
2022-03-19 12:35:32.183 Info HttpClient: GET https://image.tmdb.org/t/p/original/kszgzqaXsb2msNQR5zQLFZqABV0.jpg

 

 

Is it maybe because of 

MovieDbPersonProvider metadata is incomplete for language de. Trying English...

The Internal TMDB Function seems to use other languages if the Standard Library Language not found. In my Case the default Language is German.

 

So maybe your Plugin only Checks for German, if German not Found its not check for alternativ language English? And thats why in my Case so many Images are missing.

If yes there are 2 Solutions:

1) Do it like the Internal Emby Function and if in the Libary Language no image Found, use English as alternative

or

2) Ignore the Libary Language and use Englisch all the Time for Actor Images. Because on Actor Images i think it makes no different which language is set because there is no text etc. on the images. but the Englisch Database is the biggest one. So ignore the Libary Language and use Englisch all the time.

Edited by Spegeli
Link to comment
Share on other sites

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...