Jump to content

Move files from a location without rescan


Recommended Posts

Posted (edited)

Hi Everybody 

Since I use Emby I sometimes move some files from a location to another.

But these days I moved a lot of TV Episodes and the Emby process rescan every episode, download synopsis, create thumbnails....

 

I found a "starting way" to update the database when you move your files.. but with some tries (on a test server) I figured out some issues.

After trying this update, I upgrade it to

 

UPDATE MediaItems
SET `Path` = replace(`Path` , 'W:\Series\T_to_Z', '\\srv-wds\sdb-root\Series\T_to_Z')
where `type` in ( 6 , 8 ) AND `Path` like 'W:\Series\T_to_Z%';

In order to not change the folders definitions of a library...

But the dependancy isn't satisfied for the 'ParentId' column....

 

Is there a script or a utility to update the DB when you move your TV Shows files from a disk to another without loosing downloaded metadatas?

 

 

In Example

My "Series" Library have 4 paths defined : S:\SeriesTV\A_to_F; R:\Series\G_to_L; P:\Series\M_to_S ; W:\Series\T_to_Z

I had to move the data from "W:\Series\T_to_Z" to "\\srv-wds\sdb-root\Series\T_to_Z".

So, I moved the data and the Emby Server rescan the folder, and deletes all metadata files concerning the old path.

 

I'm guessing about creating an executable to "Update DB after changing files location".... unless it already exists...

Edited by elpoolet
Happy2Play
Posted

If you are not saving nfo/images with media all will be deleted as the previous path no longer exists and Emby deletes the /metadata/library/xx/xxxxxx folder created for that database item.

You would have to have Emby shutdown and run updates to Path and Images columns in mediaitems table for all the items you are moving

Posted
3 minutes ago, Happy2Play said:

If you are not saving nfo/images with media all will be deleted as the previous path no longer exists and Emby deletes the /metadata/library/xx/xxxxxx folder created for that database item.

You would have to have Emby shutdown and run updates to Path and Images columns in mediaitems table for all the items you are moving

It's what I plan.
But I can't manage to have the relationships in the database items to create the correct scripts.

It would be a great feature for a future release to have the baility to "Move media files to a new location" in the Emby dashbord. Don't you think ?

Even if I don't know if it does worth it since it's not an usual process....

  • Like 2

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