Jump to content

Recommended Posts

Posted (edited)

I am in a process of moving my libraries from NAS to Mac mini. I have about 25 libraries and it is a pain in the *** to update the location of each library. Can you please add a simple way to bulk edit libraries to update locations?

Edited by slyfox
Posted

Hi.  How would you envision this working such that it would be quicker?

Thanks.

Posted

Settings - Library - Advanced - Edit Libraries Location

Plain Text Entires - Each library on its own line.

Copy and paste to TextEdit - Find and Replace entires

Paste back into Emby.

Click save and rescan.

Happy2Play
Posted

And that would update every item in the database some how?

You can technically do this all manually off line by updating library paths in /root/default and updating the database manually

Posted
1 minute ago, Happy2Play said:

And that would update every item in the database some how?

You can technically do this all manually off line by updating library paths in /root/default and updating the database manually

No, in the scenario that I proposed, clicking save would trigger library update. 

Can you please provide more details on "/root/default" where would this be found on a Mac?

Happy2Play
Posted
2 minutes ago, slyfox said:

Can you please provide more details on "/root/default" where would this be found on a Mac?

It is in the Emby programdata folder.  You should see the general path via the Dashboard Paths box or in the to section of a log.

But updating the the  <PathInfos> in the libraries option.xml still requires manual update in the database or all items will be purged do to database containing a item with a old path that does not exist any more. 

Discussion here, not a simple task

 

  • 4 years later...
Posted

i too would love to be able to edit a simple text file to update all server paths ... i have 100 libraries to update the paths for since i moved it off my synology and it would be so easy to search and replce but instead Im lookling at hours and hours of repeating the same task to change the same path in each library.

And the above instructions make absolutely no sense, sorry.

  • Thanks 1
Happy2Play
Posted (edited)
7 hours ago, Nzzer0 said:

i too would love to be able to edit a simple text file to update all server paths ... i have 100 libraries to update the paths for since i moved it off my synology and it would be so easy to search and replce but instead Im lookling at hours and hours of repeating the same task to change the same path in each library.

And the above instructions make absolutely no sense, sorry.

Have had hit and miss results as I assume not every area gets properly updated and will guess there may be even more locations that may need updates.  But I had no issues with a basic move not to long ago.

Manual library.db update

UPDATE "main"."MediaItems" SET "Path" = replace( "Path", 'C:\Users\Media\Desktop\Videos', 'E:\Media' ) WHERE path LIKE 'C:\Users\Media\Desktop\Videos%';
UPDATE "main"."MediaItems" SET "Images" = replace( "Images", 'C:\Users\Media\Desktop\Videos', 'E:\Media' ) WHERE Images LIKE 'C:\Users\Media\Desktop\Videos%';
UPDATE "main"."MediaStreams2" SET "Path" = replace( "Path", 'C:\Users\Media\Desktop\Videos', 'E:\Media' ) WHERE path LIKE 'C:\Users\Media\Desktop\Videos%';
UPDATE "main"."Chapters3" SET "ImagePath" = replace( "ImagePath", 'C:\Users\Media\Desktop\Videos', 'E:\Media' ) WHERE imagepath LIKE 'C:\Users\Media\Desktop\Videos%';
UPDATE "main"."ItemExtradata" SET "Value" = replace( "Value", '"Path":"C:\\Users\\Media\\Desktop\\Videos', '"Path":"E:\\Media' ) WHERE value LIKE '%"Path":"C:\\Users\\Media\\Desktop\\Videos%';

If you filled in Network path on Library setup you will could need to update in options.xml and itemextradata. xml is obsolete in new 4.8+
Cinema Intro plugin paths
If you use AutoOrganizer you will need to update or delete the fileorganization.db
If you applied user images then path will need updated users.db

 

Edited by Happy2Play

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