Jump to content

Changing path to new location


denywinarto

Recommended Posts

denywinarto

Googled a bit but there doesn't seem to be a clear solution,

i'm revamping my library structure for automation purpose, e.g :

 

WEST / WEST A-E / Annabelle (2017) / Annabelle.mkv

.

.

WEST / WEST U-Z / Zoolander (2012) / Zoolander.mkv

 

New structure :

 

WEST / A/ Annabelle (2017) / Annabelle.mkv

.

.

WEST / Z/ Zoolander (2012) / Zoolander.mkv

 

Now i lookup a bit on the folders, and there seems to be 2 files that are related to this, .mblink and options.xml

 

    <MediaPathInfo>
      <Path>N:\WEST / WEST A-E </Path>
    </MediaPathInfo>
 
Then there is 
WEST A-E.mblink containing above path
 
 
 
So just wondering, is this change enough?
 
    <MediaPathInfo>
      <Path>N:\WEST / WEST A</Path>
    </MediaPathInfo>
.
.
.
    <MediaPathInfo>
      <Path>N:\WEST / WEST Z</Path>
    </MediaPathInfo>
 
Barat A.mblink 
.
.
.
Barat Z.mblink 
 
is this good enough to make emby server detect it?
I'm trying to minimize downtime so that emby can be activated ASAP
 
Link to comment
Share on other sites

Hi.  Neither of those files are used by Emby i don't believe.

 

Simply move your media to the new location and run a library scan.

 

if you save the metadata with the media, this should be a pretty painless process.  If not, then all metadata will probably have to be re-fetched.

 

Please let us know how you get on.

 

Thanks.

  • Thanks 1
Link to comment
Share on other sites

denywinarto

Hi.  Neither of those files are used by Emby i don't believe.

 

Simply move your media to the new location and run a library scan.

 

if you save the metadata with the media, this should be a pretty painless process.  If not, then all metadata will probably have to be re-fetched.

 

Please let us know how you get on.

 

Thanks.

Not sure but in each media there is movie.nfo, poster and fanart and that's pretty much it.

Re-fetching the metadata is exactly what i'm trying to avoid..

Last time when my server crashed and i recover from backup, emby took 3 days to rescan my whole library.

If those files arent used, then do i need to change the paths on emby server as well?

Link to comment
Share on other sites

That sounds like old metadata but I believe we will still read those as long as you have a single movie per folder.

 

All you need to do is move the media, then make sure your libraries are pointing to the new location (if it changed - the roots may not have) and run a scan.

 

If you are re-arranging everything, might be best to bring down the server while you do it so it doesn't go crazy trying to react to changes.

  • Thanks 1
Link to comment
Share on other sites

denywinarto

That sounds like old metadata but I believe we will still read those as long as you have a single movie per folder.

 

All you need to do is move the media, then make sure your libraries are pointing to the new location (if it changed - the roots may not have) and run a scan.

 

If you are re-arranging everything, might be best to bring down the server while you do it so it doesn't go crazy trying to react to changes.

Thanks but im still a bit unclear, does this part need to be changed? Since obviously that path would not exist anymore

post-210977-0-85212500-1567695388_thumb.jpg

Edited by denywinarto
Link to comment
Share on other sites

Yes that's what I meant by:

 

 

... then make sure your libraries are pointing to the new location...

 

Thanks.

Link to comment
Share on other sites

denywinarto

Yes that's what I meant by:

 

 

 

 

Thanks.

Well.. then arent those path linked to options.xml and .mblink files?

 

They contain exact same path

 

If so then its alot easier to make a copy of those files, modidy the values and replace the original to minimize downtime isnt it?

 

If done manually through emby server, i will have to create a-z folders 4 times, thats 26*4

Edited by denywinarto
Link to comment
Share on other sites

If so then its alot easier to make a copy of those files, modidy the values and replace the original to minimize downtime isnt it?

 

Yes in theory, but we haven't really been testing doing that.

Link to comment
Share on other sites

Happy2Play

Those mblink files have been deprecated over time and are no longer present in a new installation as I have recently found out.

Link to comment
Share on other sites

denywinarto

Those mblink files have been deprecated over time and are no longer present in a new installation as I have recently found out.

 

So.. which files should i edit if i want to change it directly?

Link to comment
Share on other sites

Happy2Play

So.. which files should i edit if i want to change it directly?

 

As far as I know Emby is only using the options.xml now.  But realistically unless you are manually modding the database, there is no need to manually change this files.  You will have to udpate every playlist and collection as moving media this was does not update the paths in their xml files correctly either.  

Link to comment
Share on other sites

denywinarto

As far as I know Emby is only using the options.xml now.  But realistically unless you are manually modding the database, there is no need to manually change this files.  You will have to udpate every playlist and collection as moving media this was does not update the paths in their xml files correctly either.  

 

Hmmm but /data/library.db is locked, so i guess i only have to edit options.xml and let emby refetch the metadata?

Link to comment
Share on other sites

Happy2Play

Hmmm but /data/library.db is locked, so i guess i only have to edit options.xml and let emby refetch the metadata?

 

You have to shutdown Emby to open and edit the database.  If you only edited the xml the database would nuke all existing entries as the item paths do not exist anymore that are in the database.  So the same as removing the library in Emby and re-adding them.

 

But maintain a good backup your database before editing.

  • Like 1
Link to comment
Share on other sites

denywinarto

You have to shutdown Emby to open and edit the database.  If you only edited the xml the database would nuke all existing entries as the item paths do not exist anymore that are in the database.  So the same as removing the library in Emby and re-adding them.

 

But maintain a good backup your database before editing.

 

Just tried browsing the database with dbbrowser

i suppose i could change the path of my movies by copying and editing it in notepad+

 

But the other problem is creating new library path,

there are 2 keys on library path that i can't understand, if i were to create a new entry,

presentationuniquekey and userdatakeyid..

where does the value come from?

Link to comment
Share on other sites

Happy2Play

Just tried browsing the database with dbbrowser

i suppose i could change the path of my movies by copying and editing it in notepad+

 

But the other problem is creating new library path,

there are 2 keys on library path that i can't understand, if i were to create a new entry,

presentationuniquekey and userdatakeyid..

where does the value come from?

Emby generates them, there is no need to do anything with those columns.

 

You would need to do something like this but to the path column and image column if you save images with media.

 

https://emby.media/community/index.php?/topic/63573-36051-metadata-people-empty/?p=631133

 

So you would update the database and the options.xml for the libraries you are changes.

Link to comment
Share on other sites

denywinarto

Emby generates them, there is no need to do anything with those columns.

 

You would need to do something like this but to the path column and image column if you save images with media.

 

https://emby.media/community/index.php?/topic/63573-36051-metadata-people-empty/?p=631133

 

So you would update the database and the options.xml for the libraries you are changes.

 

Thanks for mentioning this, but strangely, in my mediaitems table, i cant find paths that contains metadata path or alike. Perhaps it's fixed in newer versions? 

I have sorted the path columns alphabetically,

 

Another thing that i can't find, i also set up shared folder path on each of my library path for local access..

But i can't find the entry for these in the database.. any thoughts?

 

 

Edit : Hmm so the network path exists in options.xml, guess i'll create a new entry in options.xml and database during downtime then?

post-210977-0-70490600-1567735752_thumb.png

post-210977-0-47998000-1567735863_thumb.png

Edited by denywinarto
Link to comment
Share on other sites

Hi.  If you don't use the UI we've provided for doing this then we're going to have a really hard time helping you later when things aren't working properly for you because the database information has become corrupted.

Link to comment
Share on other sites

denywinarto

Hi.  If you don't use the UI we've provided for doing this then we're going to have a really hard time helping you later when things aren't working properly for you because the database information has become corrupted.

 

I will make a backup before messing with the database, if it doesn't work i'll revert it back.

It's just too much hassle using the UI cause i have to create a-z folders 4 times, while i want to minimize downtime.

Link to comment
Share on other sites

Why do you need a-z folders if you don't want them shown in the interface?

 

Or, just define the root as the library location and use the regular library views to bypass those folders...

Link to comment
Share on other sites

denywinarto

Why do you need a-z folders if you don't want them shown in the interface?

 

Or, just define the root as the library location and use the regular library views to bypass those folders...

 

I was going  for this route before, but i think i remembered not seeing "network path" option on the library items,

So i had to create folders under library items to make network path menu appears

e.g :

 

My library structure :

1. WEST

> WEST A-E Folder

>.

> WEST U-Z Folder

2. ASIAN

3. ANIMATION

 

The network path option does not appear on WEST item, i had to create "WEST A-E" and then set the network path there.

So a child folder seems to be necessary to create a network path? 

Link to comment
Share on other sites

denywinarto

5d72eb8c0d711_sharednetwork.png

 

This option does not exist in "ANIMASI", which i set as main library items

Edited by denywinarto
Link to comment
Share on other sites

Can you show a screenshot of it not being there? Because the option is always there. There are no conditions about it available or not available.

Link to comment
Share on other sites

denywinarto

Can you show a screenshot of it not being there? Because the option is always there. There are no conditions about it available or not available.

 

 

The menu is long, taking screenshot is kinda difficult so i record it

 

 

I cannot set the library higher than this, because i want "animasi" recent items on home screen 

Link to comment
Share on other sites

Happy2Play

There is no reason you can't just point to "N:\ANIMASI" as the items will only be nested in Folder view.
 

I was going  for this route before, but i think i remembered not seeing "network path" option on the library items,
So i had to create folders under library items to make network path menu appears
e.g :
 
My library structure :
1. WEST
> WEST A-E Folder
>.
> WEST U-Z Folder
2. ASIAN
3. ANIMATION
 
The network path option does not appear on WEST item, i had to create "WEST A-E" and then set the network path there.
So a child folder seems to be necessary to create a network path?

Network shares option is available on every folder you attach to a library.

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