elpoolet 26 Posted February 22, 2022 Posted February 22, 2022 (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 February 22, 2022 by elpoolet
Happy2Play 9783 Posted February 22, 2022 Posted February 22, 2022 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
elpoolet 26 Posted February 22, 2022 Author Posted February 22, 2022 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.... 2
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now