Jump to content

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


mickle026
Go to solution Solved by GrimReaper,

Recommended Posts

mickle026

Not sure what to say. Im building and testing it with Version 4.7.0.22 beta but im pretty sure it should run on 4.6.7.0

 

Maybe check the server log, within the first minute of the log ther should be an load and entry point

Loading CustomProvider, Version=1.0.0.xxxx, Culture=neutral, PublicKeyToken=null from C:\Users\xxxxx\AppData\Roaming\Emby-Server\programdata\plugins\CustomProvider.dll

 

Link to comment
Share on other sites

TallBoiDez
12 minutes ago, mickle026 said:

Not sure what to say. Im building and testing it with Version 4.7.0.22 beta but im pretty sure it should run on 4.6.7.0

 

Maybe check the server log, within the first minute of the log ther should be an load and entry point

Loading CustomProvider, Version=1.0.0.xxxx, Culture=neutral, PublicKeyToken=null from C:\Users\xxxxx\AppData\Roaming\Emby-Server\programdata\plugins\CustomProvider.dll

 

I just check and I do see that in the logs, but still doesn't show in my plugin list

Link to comment
Share on other sites

mickle026

Ok, Im not sure why , it would look like this if it did. I'm compiling against netstandard 2.0, so should be compatible.

485870271_Screenshot2022-02-02at22-47-35Emby.png.689e18145f2733fd74dd6822ae5dece1.png

 

I know you cannot access it remotely, only local, but it still shows.

Edited by mickle026
Link to comment
Share on other sites

TallBoiDez
7 minutes ago, mickle026 said:

Ok, Im not sure why , it would look like this if it did. I'm compiling against netstandard 2.0, so should be compatible.

485870271_Screenshot2022-02-02at22-47-35Emby.png.689e18145f2733fd74dd6822ae5dece1.png

 

I know you cannot access it remotely, only local, but it still shows.

Okay, I'll remove it and try downloading it again and adding it to see if shows up

Link to comment
Share on other sites

mickle026

Yep, its not compatible with your older server version.

2022-02-02 18:35:25.337 Error App: LoaderException: Could not load file or assembly 'MediaBrowser.Model, Version=4.7.0.19, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

My plugin is trying to load a newer "Version=4.7.0.19" and yours doesn't have it.  That explains why its not showing.  Sorry.  Its a nuget package used by the code compiler.

MediaBrowser.Model
MediaBrowser.Common

ok, Ive rebuilt it with 4.6.0.50 server core.  This should fix this issue.

 

Download removed

 

 

Edited by mickle026
Link to comment
Share on other sites

TallBoiDez
1 hour ago, mickle026 said:

Yep, its not compatible with your older server version.

2022-02-02 18:35:25.337 Error App: LoaderException: Could not load file or assembly 'MediaBrowser.Model, Version=4.7.0.19, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

My plugin is trying to load a newer "Version=4.7.0.19" and yours doesn't have it.  That explains why its not showing.  Sorry.  Its a nuget package used by the code compiler.

MediaBrowser.Model
MediaBrowser.Common

ok, Ive rebuilt it with 4.6.0.50 server core.  This should fix this issue.  Download is below.

 

CustomProvider.zip 2.66 MB · 0 downloads

okay now it showing up, thank you

Link to comment
Share on other sites

mickle026

Yes.  Set that in Global Tab.
713424532_Screenshot2022-02-03at03-23-27Emby.png.475176949a0ade826f06c5b4c2ce762d.png

Then in Backup Use Backup People

1681442470_Screenshot2022-02-03at03-24-17Emby.png.a4e751fac8431a9f84ae3f16636bd045.png

 

It will output a directory like this

PersonDB/

Capture.JPG.79774ea719b67025b81fe7fe7fec74e7.JPG

The primary folder contains the images, they do not have the presons name with them,  The Image names are in IMDB, TMBD key folders and PersonByName with reference files to the images in the PRIMARY folder.  The image info stored in IMDB/nm000xxxx/Primary0.nfo
So People can have the same names and exist multiple times.  The Plugin reads these files to restore or lookup if you configure it as a fetcher in library settings.

 

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

TallBoiDez
40 minutes ago, mickle026 said:

Yes.  Set that in Global Tab.
713424532_Screenshot2022-02-03at03-23-27Emby.png.475176949a0ade826f06c5b4c2ce762d.png

Then in Backup Use Backup People

1681442470_Screenshot2022-02-03at03-24-17Emby.png.a4e751fac8431a9f84ae3f16636bd045.png

 

It will output a directory like this

PersonDB/

Capture.JPG.79774ea719b67025b81fe7fe7fec74e7.JPG

The primary folder contains the images, they do not have the presons name with them,  The Image names are in IMDB, TMBD key folders and PersonByName with reference files to the images in the PRIMARY folder.  The image info stored in IMDB/nm000xxxx/Primary0.nfo
So People can have the same names and exist multiple times.  The Plugin reads these files to restore or lookup if you configure it as a fetcher in library settings.

 

It's not creating that for me, nothing really happens when I hit backup people

Link to comment
Share on other sites

mickle026

What Backup Path did you set?, make sure its local or samba and without the trailing slash.  NFS, Non Write enabled etc probably wont work.

if you cannot get it to work

Resart Emby, so it writes to a fresh log
Click backup.
Post the log so i can see whats happening

You are probably getting an error thrown in embyserver.txt

 

Thanks

Link to comment
Share on other sites

TallBoiDez
2 hours ago, mickle026 said:

What Backup Path did you set?, make sure its local or samba and without the trailing slash.  NFS, Non Write enabled etc probably wont work.

if you cannot get it to work

Resart Emby, so it writes to a fresh log
Click backup.
Post the log so i can see whats happening

You are probably getting an error thrown in embyserver.txt

 

Thanks

i set a local path, but nothing shows up in the folder.

 

Edited by TallBoiDez
Link to comment
Share on other sites

mickle026

I see the error.

Its a linux error in my app.  For whatever reason its not putting slashes in your directory path.

System.UnauthorizedAccessException: System.UnauthorizedAccessException: Access to the path '/run/s6/services/emby/mntshare2Emby FilesActor BackupPersonDBPersonByNameMarlee Matlin' is denied.

Should look like this.

/run/s6/services/emby/mnt/share2/Emby Files/Actor Backup/PersonDB/PersonByName/Marlee Matlin'

I dont have linux so I cannot test this.  But i'll investigate & fix.  This might be a pain for you but it actually helps me.

Im at work soon so wont be tonight.

Thanks

  • Like 1
Link to comment
Share on other sites

TallBoiDez
6 hours ago, mickle026 said:

I see the error.

Its a linux error in my app.  For whatever reason its not putting slashes in your directory path.

System.UnauthorizedAccessException: System.UnauthorizedAccessException: Access to the path '/run/s6/services/emby/mntshare2Emby FilesActor BackupPersonDBPersonByNameMarlee Matlin' is denied.

Should look like this.

/run/s6/services/emby/mnt/share2/Emby Files/Actor Backup/PersonDB/PersonByName/Marlee Matlin'

I dont have linux so I cannot test this.  But i'll investigate & fix.  This might be a pain for you but it actually helps me.

Im at work soon so wont be tonight.

Thanks

No, not a pain at all I'm glad I can help and take your time, plugin is looking great. 

Link to comment
Share on other sites

Hi there 😃

A couple things I have found when dealing with file paths, is to always try to use the Path.Combine method when creating paths.

Linux and windows do different separators / \ so Path.Combine takes care of it quite well.

The last error mentions an denial of access to the folder. 

Have those paths had access permissions for the current user? 

 

I really like the look if this plugin. It is huge! I can see a lot of work has gone into it. 

If I can help please let me know. 👍😃

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

mickle026
On 04/02/2022 at 00:59, chef said:

Hi there 😃

A couple things I have found when dealing with file paths, is to always try to use the Path.Combine method when creating paths.

Linux and windows do different separators / \ so Path.Combine takes care of it quite well.

The last error mentions an denial of access to the folder. 

Have those paths had access permissions for the current user? 

 

I really like the look if this plugin. It is huge! I can see a lot of work has gone into it. 

If I can help please let me know. 👍😃

Hi again Chef

I've moved on quite a bit havent I? .. However ive never heard of path.combine i'll have to take a looksie :) , thanks

 

On 04/02/2022 at 00:22, TallBoiDez said:

No, not a pain at all I'm glad I can help and take your time, plugin is looking great. 

Thanks for your  time

Heres a new build which "should" fix the issue.  Let me know, if it doesn't please pm me your log (as before try it after a restart so i can find it in the logs easily).

download removed (newer version below)

 

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

TallBoiDez

@mickle026 unfortunately I'm still getting this error "System.UnauthorizedAccessException: System.UnauthorizedAccessException: Access to the path '/run/s6/services/emby/mntshare2Emby FilesActor BackupPersonDBPersonByNameMarlee Matlin' is denied." I will pm you the log file

Link to comment
Share on other sites

mickle026

definately a linux related error, my code allows for this but something is obviouslyt not working, so im going to have to go back to get an old pc out of the attic and install linux on it to see whats happening, I suspect as in my server everything works fine on windows.

 

Thanks for checking

  • Like 1
Link to comment
Share on other sites

mickle026

OK, Last attempt at fixing the linux path issue before getting an old machine out of the loft and installing linux on it.

This archive contains stable and beta server releases ( whilst doing this figured out how to compile both at the same time :) )

CustomProviderbeta.dll for the beta testing server version
CustomProviderStable.dll for the users not on the beta testing server version

Please remove the old version by going to the plugin folder rather than in Emby menus, Rename the save "Plugin/configurations" file from CustomProvider.xml to either CustomProviderbeta.xml or CustomProviderStable.xml to keep your settings

Then restart the server.

 

Edited by mickle026
Link to comment
Share on other sites

mickle026

Latest Build (1.0.0.1763 stable and 1769 for beta) 6 feb 2022 21:59pm gmt

Fix to Backup when emby's image links are http.  Now downloads them and backs them up instead of stopping with an error
Another fix for linux paths.  (Not tested)
       at CustomProvider.CustomProvider.BackupImageLibrary(String ItemType)
       at CustomProvider.CustomProvider.Get(GenericBackupPeople result)

Function now returns proper path to calling function,  but untested if it has fixed the issue - still havent got a machine with linux on it yet.

Please stick with me because I added a few more logging items, to trap these two errors above.  They are not yet optional, i'll add that later. (like some others)

There is a checksum log produced on backups, produced when verbose logging, this provides the path of the image and its MD5 checksum.
% indicator on backup tracks is not working yet nor is switching off overwrite on backup tracks (they still overwrite if they exist in the backup location).

A lot more people uploaded to media-and-meta.com that this plugin will grab if the fetchers are turned on and this url is in one of the servers in the global tab

 

 

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

Commerzpunk

Hello,

i found this thread because I am suffering from the grey actor placeholder thing.

So what I did was, to download this plugin here, configure an empty dummy backup path and startet the "Fix Actor Placeholders" Action on the "Repair" Tab.

Its now running for almost 48 hours and i cant see any progress in my 5 movies that i monitor to check if the actor images show up.

My Server is a i5 32 GB Unraid-Machine, Emby running as a Docker container - this machine is pretty fast over all.

Plugin is version 1.0.0.1690, Emby is version 4.7.0.22.

I got like 1000 movies in there.

Could that still be OK and normal? Such a long runtime for the fix?

 

Here is a very small part of the log which is repeating with all different actors since 2 days now:

2022-02-09 18:11:53.428 Info CustomProvider: Metadata Path: /config/metadata
2022-02-09 18:11:53.428 Info CustomProvider: ActorGuid: 1dda6606c38c45e5862569301100ae66
2022-02-09 18:11:54.219 Info CustomProvider: 10996/29083 - Looking at: PersonDB/PersonByName/Franck Neel/Primary0.nfo
2022-02-09 18:11:54.219 Info CustomProvider: Metadata Path: /config/metadata
2022-02-09 18:11:54.219 Info CustomProvider: ActorGuid: f02852f1e6964fedb82271b77978daa6
2022-02-09 18:12:00.323 Info CustomProvider: 10782/29083 - Looking at: /mnt/user/SHARE/dummyPersonDB/PersonByName/1479797/Banner0.nfo
2022-02-09 18:12:00.323 Info CustomProvider: Metadata Path: /config/metadata
2022-02-09 18:12:00.323 Info CustomProvider: ActorGuid: 1dda6606c38c45e5862569301100ae66
2022-02-09 18:12:01.161 Info CustomProvider: 10996/29083 - Looking at: PersonDB/TMDB/2531034/Primary0.nfo
2022-02-09 18:12:01.161 Info CustomProvider: Metadata Path: /config/metadata
2022-02-09 18:12:01.161 Info CustomProvider: ActorGuid: f02852f1e6964fedb82271b77978daa6
2022-02-09 18:12:07.296 Info CustomProvider: 10782/29083 - Looking at: /mnt/user/SHARE/dummyPersonDB/TMDB/1479797/Banner0.nfo
2022-02-09 18:12:07.296 Info CustomProvider: Metadata Path: /config/metadata
2022-02-09 18:12:07.296 Info CustomProvider: ActorGuid: 5bfd5dc7407345bcab443150c43d7d7c
2022-02-09 18:12:08.109 Info CustomProvider: 10996/29083 - Looking at: PersonDB/PersonByName/2531034/Backdrop0.nfo
2022-02-09 18:12:08.109 Info CustomProvider: Metadata Path: /config/metadata
2022-02-09 18:12:08.109 Info CustomProvider: ActorGuid: f02852f1e6964fedb82271b77978daa6
2022-02-09 18:12:14.100 Info CustomProvider: 10783/29083 - Looking at: /mnt/user/SHARE/dummyPersonDB/PersonByName/Dejan Angelov/Primary0.nfo
2022-02-09 18:12:14.100 Info CustomProvider: Metadata Path: /config/metadata
2022-02-09 18:12:14.100 Info CustomProvider: ActorGuid: 5bfd5dc7407345bcab443150c43d7d7c
2022-02-09 18:12:14.912 Info CustomProvider: 10996/29083 - Looking at: PersonDB/TMDB/2531034/Backdrop0.nfo
2022-02-09 18:12:14.912 Info CustomProvider: Metadata Path: /config/metadata
2022-02-09 18:12:14.912 Info CustomProvider: ActorGuid: f02852f1e6964fedb82271b77978daa6
2022-02-09 18:12:20.931 Info CustomProvider: 10783/29083 - Looking at: /mnt/user/SHARE/dummyPersonDB/TMDB/94699/Primary0.nfo
2022-02-09 18:12:20.931 Info CustomProvider: Metadata Path: /config/metadata
2022-02-09 18:12:20.931 Info CustomProvider: ActorGuid: 5bfd5dc7407345bcab443150c43d7d7c
2022-02-09 18:12:21.748 Info CustomProvider: 10996/29083 - Looking at: PersonDB/PersonByName/2531034/Logo0.nfo
2022-02-09 18:12:21.748 Info CustomProvider: Metadata Path: /config/metadata
2022-02-09 18:12:21.748 Info CustomProvider: ActorGuid: f02852f1e6964fedb82271b77978daa6
2022-02-09 18:12:27.735 Info CustomProvider: 10783/29083 - Looking at: /mnt/user/SHARE/dummyPersonDB/PersonByName/94699/Backdrop0.nfo
2022-02-09 18:12:27.735 Info CustomProvider: Metadata Path: /config/metadata
2022-02-09 18:12:27.735 Info CustomProvider: ActorGuid: 5bfd5dc7407345bcab443150c43d7d7c
2022-02-09 18:12:28.560 Info CustomProvider: 10996/29083 - Looking at: PersonDB/TMDB/2531034/Logo0.nfo
2022-02-09 18:12:28.560 Info CustomProvider: Metadata Path: /config/metadata
2022-02-09 18:12:28.560 Info CustomProvider: ActorGuid: f02852f1e6964fedb82271b77978daa6
Link to comment
Share on other sites

mickle026

That logged information is not actually the repair, thats Emby looking for missing people images on the backup server (Probably from Restore Files, did you do the restore button?).  It could be any of your missing people in your library. 

Put my server in your severs in global tab as well and if I have the image it will get it from there when you access the actor page or a client does.  I have currently 51931 people on there, some of which are not on imdb or tmdb.

Try this one below, Ive replaced the repair broken image link in the DB with remove it from the DB and Disk. (at your own risk),

I also added a seperate log file that will appear in the logs if it removes any.

 

OK

Clarification

Fix, Removes the damaged images
Backup, Puts your library on your backup disk
Restore, Puts your backup (disk) back to the library

This does not put people in the missing people but removes broken files, and resets Emby to look for them again.  (Click the Actor, Add New media or Search in Edit Images)

You have to manually add them by anyuser clicking the placeholder and then emby will try to download them from the providers set in your library, if you set "custom provider" as a fetcher in your library settings it will use wherever this plugin is configured to look (http servers in global tab).  Or you can search for them with "Edit Images".

 

In your case it looks as though you are trying to use restore thinking it will get them from the web, but that gets them from your backup.  If you didnt have them when you backed up, then they are not there to fetch.

 

Edited by mickle026
Link to comment
Share on other sites

Commerzpunk

Hello,

i think something is wrong.

I downloaded the new version, used the "beta" dll, renamed my xml, so the settings were preserved, then i put your server adress in the global page (I really dont understand why i need this, i just want to repair my actors and dont want to click every single one by hand).

Next, i pressed the "fix" button in the repair-tab, starts "running" and stays for ever.

Then, i pressed the "remove known placeholders", starts "running" too and stays for ever, too.

The log seems to send errors for both of them?

 

"FIX"

2022-02-09 22:09:48.564 Error Server: Error processing request
    *** Error Report ***
    Version: 4.7.0.23
    Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3
    Operating system: Linux version 5.10.28-Unraid (root@Develop) (gcc (GCC) 9.3.0, GNU ld version 2.33.1-slack15) #1 SMP Wed Apr 7 08:23:18 PDT 2021
    Framework: .NET 6.0.0-rtm.21522.10
    OS/Process: x64/x64
    Runtime: system/System.Private.CoreLib.dll
    Processor count: 6
    Data path: /config
    Application path: /system
    System.IO.FileNotFoundException: System.IO.FileNotFoundException: Could not find file '/var/run/s6/services/emby-server/https:/image.tmdb.org/t/p/original/uJPHaOX6tUKmjGTlGEVuitiL8e1.jpg'.
    File name: '/var/run/s6/services/emby-server/https:/image.tmdb.org/t/p/original/uJPHaOX6tUKmjGTlGEVuitiL8e1.jpg'
       at System.IO.FileInfo.get_Length()
       at CustomProvider.CustomProvider.ValidImage(String Path)
       at CustomProvider.CustomProvider.Get(fixBrokenActorFiles result)
       at Emby.Server.Implementations.Services.ServiceController.Execute(HttpListenerHost appHost, Object requestDto, IRequest req)
       at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, RestPath restPath, String responseContentType, CancellationToken cancellationToken)
       at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken)
    Source: System.Private.CoreLib
    TargetSite: Int64 get_Length()

 

 

"REMOVE"

    
2022-02-09 22:11:13.319 Error Server: Error processing request
    *** Error Report ***
    Version: 4.7.0.23
    Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3
    Operating system: Linux version 5.10.28-Unraid (root@Develop) (gcc (GCC) 9.3.0, GNU ld version 2.33.1-slack15) #1 SMP Wed Apr 7 08:23:18 PDT 2021
    Framework: .NET 6.0.0-rtm.21522.10
    OS/Process: x64/x64
    Runtime: system/System.Private.CoreLib.dll
    Processor count: 6
    Data path: /config
    Application path: /system
    System.IO.DirectoryNotFoundException: System.IO.DirectoryNotFoundException: Could not find a part of the path '/var/run/s6/services/emby-server/https:/image.tmdb.org/t/p/original/uJPHaOX6tUKmjGTlGEVuitiL8e1.jpg'.
       at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
       at Interop.CheckIo(Error error, String path, Boolean isDirectory, Func`2 errorRewriter)
       at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
       at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
       at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
       at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
       at System.IO.File.OpenRead(String path)
       at CustomProvider.CustomProvider.GetChecksum(String file)
       at CustomProvider.CustomProvider.Get(RemovePlaceHolders result)
       at Emby.Server.Implementations.Services.ServiceController.Execute(HttpListenerHost appHost, Object requestDto, IRequest req)
       at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, RestPath restPath, String responseContentType, CancellationToken cancellationToken)
       at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken)
    Source: System.Private.CoreLib
    TargetSite: Void ThrowExceptionForIoErrno(ErrorInfo, System.String, Boolean, System.Func`2[Interop+ErrorInfo,Interop+ErrorInfo])
   

Link to comment
Share on other sites

Commerzpunk

BTW, why I am doing so:

Because in an other thread its marked as a solution for a very common Emby problem:

 

 

 

All Ii try to do is getting rid of this stupid gray actor images that magicaly repair if i click them by hand.

Link to comment
Share on other sites

mickle026
On 09/02/2022 at 21:29, Commerzpunk said:

All Ii try to do is getting rid of this stupid gray actor images that magicaly repair if i click them by hand.

OK,

Rebuilt the plugin with logic to ignore http where the image exists on the server when running fix or remove placeholders & report a crash if it happens.  Rather than crash and not update the webpage.

Added the report below since the last build

Build attached.

Stable for the stable server, the beta is for the .23 beta server if you run the beta program server.

 

Is the stupid gray actor images thing an image or embys card?

Can you run this from the reports tab874380355_Screenshot2022-02-10at05-57-06Emby.png.a3d0e9288f8faac20ed78d4de396b10f.png

If you cannot see reports, click the last tab and they will scroll.

Also get the ID of a person that has the stupid grey card from the browser ie "/web/index.html#!/item?id=4365&"

then from with LOGS

1735715085_Screenshot2022-02-10at05-59-47Emby.png.05326a7d88bad307cd4d31c5d23bffe3.png

you will have this file, find the ID of the Actor , and send me the image from your drive and this log with the checksum. zip it and upload it or pm it to me.

If you cannot do this the please screenshot it so at least I know what it looks like.

 

Thanks

 

Edited by mickle026
  • Like 1
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...