Jump to content

Migration Plugin


pünktchen

Recommended Posts

pünktchen
2 hours ago, FreshDog said:

1. After the migration I had a whole bunch of warning messages in the log file. All entries were like this (without additional info and just with different dates):

Quote

Warn App: Invalid Added value found: 18.02.2018 01:00:00

However all these entries came up as a block just after the message

No these warnings are from Emby. Maybe it doesn't like it if i overwrite the scan date.

2 hours ago, FreshDog said:

2. What is the purpose of the "person.nfo" files in the person folders?
I saw that the person posters (folder.jpg) are listed as an absolute path in the nfo files and wondered why it's not a relative path at least.
I also tested the persons creation with an empty Emby test version.
In this case only the "folder.jpg" file was created by Emby in the newly created person folder but no "person.nfo" at all.
So are the "person.nfo" files needed at all?
Or can I just delete all the nfo files from persons without fearing any issues?

The person.nfo will also be created by Emby if you have storing of metadata inside your media folders activated for your libraries and you open a person details screen. It's a backup in case you've modified any person details and you have to reinstall Emby.

Link to comment
Share on other sites

6 hours ago, pünktchen said:

No these warnings are from Emby. Maybe it doesn't like it if i overwrite the scan date.

Ok. Thanks. As I didn't saw these warnings again after the migration I hope it was just a one time warning and not an issue.  🙂

The person.nfo will also be created by Emby if you have storing of metadata inside your media folders activated for your libraries and you open a person details screen. It's a backup in case you've modified any person details and you have to reinstall Emby.

Ah, ok. I understand. But I do not use storing of metadata inside the media folders.
So it is safe to delete the nfo files and also the empty person folders, correct?

Link to comment
Share on other sites

pünktchen
1 hour ago, FreshDog said:

But I do not use storing of metadata inside the media folders.
So it is safe to delete the nfo files and also the empty person folders, correct?

Yes.

  • Thanks 1
Link to comment
Share on other sites

  • 8 months later...

Hi @pünktchen
Hope you have a moment to help me.

I've resumed testing migration/move from my old (very!) MediaCenter setup where I left off some time ago.
And have installed your Migration plugin (downloaded from this thread) on a EMBY 4.7.1.0 server.

But I get the below error as soon as I start the plugin. 
Isn't the the correct way to import legacy people data anymore?

2022-06-01 14:05:11.626 Info Migration Plugin: People Migration > Searching for legacy people folders under: D:\Emby\metadata\people
2022-06-01 14:05:11.675 Info Migration Plugin: People Migration > Legacy people folders to migrate: 41566
2022-06-01 14:05:14.171 Info Migration Plugin: People Migration > Import of People from Legacy Folder started
2022-06-01 14:05:14.213 Info Migration Plugin: People Migration > Database Person: Anders Agger; Import from legacy people folder
2022-06-01 14:05:14.223 Info Migration Plugin: People Migration > Metadata Import Person: Anders Agger; Source: d:\Emby\mc550\People\A\Anders Agger\person.xml; Destination: Database
2022-06-01 14:05:14.227 Error Migration Plugin: People Migration > Import of People from Legacy Folder unexpectedly aborted
    *** Error Report ***
    Version: 4.7.1.0
    Command line: C:\Users\poul\AppData\Roaming\Emby-Server\system\EmbyServer.dll -noautorunwebapp
    Operating system: Microsoft Windows 10.0.19044
    Framework: .NET 6.0.2
    OS/Process: x64/x64
    Runtime: C:/Users/poul/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
    Processor count: 2
    Data path: C:\Users\poul\AppData\Roaming\Emby-Server\programdata
    Application path: C:\Users\poul\AppData\Roaming\Emby-Server\system
    System.MissingMethodException: System.MissingMethodException: Method not found: 'Void MediaBrowser.Controller.Entities.BaseItem.set_ForcedSortName(System.String)'.
       at MigrationPlugin.Migration.MigratePeopleMetadata.ParseXmlNodes(XmlReader reader, BaseItem baseItem, PersonItem personItem)
       at MigrationPlugin.Migration.MigratePeopleMetadata.ParseXmlFile(BaseItem baseItem, PersonItem personItem, String xmlFile, XmlReaderSettings settings, Encoding encoding)
       at MigrationPlugin.Migration.MigratePeopleMetadata.ImportLegacyPeopleMetadata(BaseItem databasePerson, String legacyPersonFolder)
       at MigrationPlugin.MigrationPlugin.MigratePeople(IProgress`1 progress)
    Source: MigrationPlugin
    TargetSite: System.ValueTuple`2[MediaBrowser.Controller.Entities.BaseItem,MigrationPlugin.Migration.Entities.PersonItem] ParseXmlNodes(System.Xml.XmlReader, MediaBrowser.Controller.Entities.BaseItem, MigrationPlugin.Migration.Entities.PersonItem)

 

 

Link to comment
Share on other sites

pünktchen

Obviously some method i've used in Emby 4.6 was removed in 4.7. I'm not sure how to go on, because the people folder has also changed again in 4.7. It's back to first letter subfolders similar to your legacy people folder. Although i don't know if it's the default setting now or if it's still a config switch in the system.xml file.

Link to comment
Share on other sites

1 hour ago, pünktchen said:

Obviously some method i've used in Emby 4.6 was removed in 4.7. I'm not sure how to go on, because the people folder has also changed again in 4.7. It's back to first letter subfolders similar to your legacy people folder. Although i don't know if it's the default setting now or if it's still a config switch in the system.xml file.

It's the default for new installs and can be set via a config switch for older installs.

Link to comment
Share on other sites

Thanks for the responses!

I would very much appreciate a pointer to how to handle the people folder.
Mine is so old that it is based on .xml files.

Link to comment
Share on other sites

Yes, pretty much. I have quite a few people which cannot be fetched from the Internet. And over time also some fetched with edited data.

Link to comment
Share on other sites

pünktchen

Here's a new version that should work with Emby 4.7.1
There's an option in the plugin settings "Create subfolders by people name first letter" that should only be ticked if your system.xml config file of Emby has

<EnablePeopleLetterSubFolders>true</EnablePeopleLetterSubFolders>

I would migrate Emby like this:

  • Make a backup of your existing Emby installation, especially the data, metadata and people folder if it differs from the programdata folder
  • Update the Emby installation to version 4.7.1 and wait until the library scan is finished
  • Shut down Emby and change the system.xml file under programdata\config to the value above
  • Place the MigrationPlugin.dll into programdata\plugins, not system\plugins
  • Start Emby and configure the migration plugin to your needs
  • Run the migration process of the plugin and keep your fingers crossed that all goes well
Link to comment
Share on other sites

Thanks a lot !
It runs fine - but I get a lot of folders like:
PS D:\Emby\metadata\people\j> gci *araskog* -rec
    Directory: D:\Emby\metadata\people\j\Julie Araskog-tmdb-1558263
-a----        02-06-2022     16:57            474 person.nfo
    Directory: D:\Emby\metadata\people\j\Julie Araskog-tmdb-1558263-tmdb-1558263
-a----        28-12-2019     19:32          86595 folder.jpg

I'll scratch my install to make sure I have a clean environment to start in. And get back to you when done.

Your plan makes sense, but my current Emby Server is 3.5.3 on Windows 7 with Windows Media Center. It works for me and most importantfor my wife!
I froze it with the (then) new people structure. And have since from time to time made a "disaster test" on a VMware virtual server, where I build a new Emby Server on a new Windows (10 at the moment) from the data I have. At the moment I have no plan to migrate my old install - but the hardware will die some day, 10+ years old.
So I plan to start on a fresh Emby install. And that, luckily is easy to test on a virtual server 🙂
 

Link to comment
Share on other sites

pünktchen
42 minutes ago, pju said:

Directory: D:\Emby\metadata\people\j\Julie Araskog-tmdb-1558263

This would be correct.

 

43 minutes ago, pju said:

Directory: D:\Emby\metadata\people\j\Julie Araskog-tmdb-1558263-tmdb-1558263

This of course not. I'll try to find the place where the id gets duplicated.

Link to comment
Share on other sites

From Emby server log:

2022-06-02 16:57:49.014 Info Migration Plugin: People Migration > Legacy people Person: d:\Emby\mc550\People\J\Julie Araskog
2022-06-02 16:57:49.021 Info Migration Plugin: People Migration > Metadata Copy Person: Julie Araskog; Source: d:\Emby\mc550\People\J\Julie Araskog\person.xml; Destination: D:\Emby\metadata\people\j\Julie Araskog-tmdb-1558263\person.nfo
2022-06-02 16:57:49.027 Info Migration Plugin: People Migration > Image Copy Person: Julie Araskog-tmdb-1558263; Source: d:\Emby\mc550\People\J\Julie Araskog\poster.jpg; Destination: D:\Emby\metadata\people\j\Julie Araskog-tmdb-1558263-tmdb-1558263\folder.jpg

But maybe you shouldn't use too much time on it before I've seen if I had a messed up the database from an earlier install. (If that can have any impact).

Link to comment
Share on other sites

pünktchen

Should be fixed now in this version.

Btw. by theory you could also run the migration with a fresh install of Emby without any library. Just point the plugin to your old people folder and it will create the new people folder structure under Emby's metadata path. If you then add libraries to Emby the peoples should be picked up from the new metadata\people folder.

Link to comment
Share on other sites

Jrod696

I have been looking through the threads trying to find an answer to my issue and I think this actually is on the same topic.

I had multiple power outages that corrupted my VM's (YAY) and I had to rebuild my Emby Server, when I go to plugins and choose the people backup plugin from the catalog and install it everything seems fine, even get an email saying it was installed and another email saying I  need to reboot, but after reboot its missing from my plugins, when I go to the files on the server I can see the PeopleBackup.dll in the plugins folder but its just not showing in the Dashboard Installed Plugins or in the Task Scheduler, has it been EOL'ed for the Migration Plugin or just need an update for the new version of the Emby Server itself?

Edited by Jrod696
Link to comment
Share on other sites

pünktchen
19 minutes ago, Jrod696 said:

has it been EOL'ed for the Migration Plugin or just need an update for the new version of the Emby Server itself?

Neither. The Migration plugin is a one time option that should not be needed any more after it has done it's job. The PeopleBackup plugin will not get updates anymore because with newer Emby versions it is just obsolete. At least if you allow writing of nfo files. If not there's another plugin here in the forum that will do the backup job for you.

Link to comment
Share on other sites

@Jrod696 I spent some time in the same hole 🙂 Could be nice if Emby did not show plugins which does not match the actual release. Confusing that it can install succesfully but does not show. 
But well, it's a minor thing. Better things for the developers to use their time on, I think.

@pünktchenI have now a succeeded (error free) migration task. But, Emby does not pick up the folders named "somebody-tmdb-#######".
So at the moment I only get data for the people I have added to legacy database myself. Which does not exist in tmdb.
What have I missed?

Link to comment
Share on other sites

PS: Just for info - I have this setting in system.xml:
<EnablePeopleLetterSubFolders>true</EnablePeopleLetterSubFolders>

Link to comment
Share on other sites

pünktchen
4 hours ago, pju said:

But, Emby does not pick up the folders named "somebody-tmdb-#######".
So at the moment I only get data for the people I have added to legacy database myself. Which does not exist in tmdb.
What have I missed?

I've tested it right now the same way i suggested earlier:
New Emby installation, EnablePeopleLetterSubFolders, Placed a modified version of "Richard Lynch-tmdb-97878" to metadata\people\r, Added a movie library -> Working!
The only thing i've changed for the movie library was to enable nfo saver and save artwork into media folders, but it also worked without these changes.

Link to comment
Share on other sites

Interesting. I did the same the oither way round:
New Emby with EnablePeopleLetterSubFolders enabled by default.
Migrated people, got a folder "Lars Ranthe-tmdb-588175" -> no info picked up.
Copied the folder to ""Lars Ranthe" - info picked up.
This also matches my finding that all my private people are seen by Emby.

But, I have no fetchers enabled in my library, since I in my legacy Emby intallatiion use "MetaBrowser" to fetch all data.
I have assumed fetchers only is needed for getting information from the Internet on people - not if they are present in the folder structure.
But there might be a connection to whether Emby looks for folders with "tmdb" in the name or not.

Link to comment
Share on other sites

pünktchen
7 minutes ago, pju said:

But, I have no fetchers enabled in my library, since I in my legacy Emby intallatiion use "MetaBrowser" to fetch all data.
I have assumed fetchers only is needed for getting information from the Internet on people - not if they are present in the folder structure.
But there might be a connection to whether Emby looks for folders with "tmdb" in the name or not.

It seems so. Either you use a tool like Advanced Renamer to batch remove the ids from the folders or you'll have enable the online metadata fetchers.

Link to comment
Share on other sites

Yeah. I'll play a little around with it.
I'm afraid renaming will get me into trouble some time in the future, if I then choose to use the fetchers...
Maybe ask Luke what triggers Emby to see folders with '-tmdb-'.
I have just created a library will default settings and the info is still not picked up.

Anyway, this problem is not related to your migration script, which does the job!
A question, though,
Some folders where the person is missing tmdb information is named "firstname lastname" and others "firstname lastname-tmdb-".
What's the difference?

Link to comment
Share on other sites

pünktchen
1 hour ago, pju said:

firstname lastname-tmdb-

You mean there's -tmdb- appended without any id? That of course should not have happened. It must be something from your old data and i've forgotten to check in the plugin when the person returns a provider key, if it really has a value. I can correct this if you want me to.

Link to comment
Share on other sites

It's no big deal, but if you have a spare moment, it would be nice to have fixed

You're right - TMDB data is missing:

D:\Emby\mc550\People\L>type "Lisbeth Zornig\person.xml"
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Item>
  <Added>12-01-2019 19:53:47</Added>
  <LockData>false</LockData>
  <LocalTitle>Lisbeth Zornig</LocalTitle>
  <ImdbId></ImdbId>
  <TmdbId></TmdbId>
  <BirthDate>0000-00-01</BirthDate>
  <PlaceOfBirth>-</PlaceOfBirth>
  <Overview>Ingen kendte data.</Overview>
</Item>
D:\Emby\mc550\People\L>type "Lyubov Rudneva\person.xml"
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Item>
  <Added>10-11-2016 19:31:48</Added>
  <LockData>false</LockData>
  <LocalTitle>Lyubov Rudneva</LocalTitle>
  <BirthDate>0000-00-01</BirthDate>
  <PlaceOfBirth>-</PlaceOfBirth>
  <Overview>Ingen kendte data.</Overview>
</Item>

 

Edited by pju
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...