Fix DB when media has moved
#1
I'm just wondering if it would be possible to scan through the DB for existing entries with an identical filename but different path.

The reason I ask is that I have 2TB of storage spread over 6 drives and occasionally have need to shuffle files around which means I have to manually add all the moved files back to the library.
This can be very time consuming, especially for TV Shows.

There is another thread :- "Extract Movie Video Database to seperate files" which is ongoing and if it stores the nfo file with the media file would solve this but I was wondering if the above could be more easily implemented.

All files on my system have unique filenames, but maybe there could be an option to enable this in AdvancedSettings.xml so it wouldnt effect those who have duplicate filenames.
Reply
#2
You can do it pretty easy if you have unique names either by exporting the db to XML and a bit of copy and paste, then a re-import.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
Thanx for the quick response, Smile

but for those lazy people among us, shame it can't be automated :p
Reply
#4
I thought "Update Library" did this automatically. It seems to work for me. I thought it cleaned the db by removing entries with invalid paths and then would add the new location in. I could swear it worked for me in the past.
Reply
#5
That does work but it takes the old ones out and re scrapes the new ones. That can take a long time with a lot of stuff moved. I believe that is what he is trying to avoid.

J_K_M_A_N
Reply
#6
a simple python script could handle that, i'm busy now, but maybe that would be a good script for you to take a stab at.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#7
J_K_M_A_N Wrote:That does work but it takes the old ones out and re scrapes the new ones. That can take a long time with a lot of stuff moved. I believe that is what he is trying to avoid.

J_K_M_A_N

Yah, I didn't consider that, but it's still better than doing things manually.
Reply
#8
I do it the same way you do myself. Then I copy the database to my other boxes. I guess it would be nice to have it be able to see that it moved and just change the path but...not that big of a deal.

J_K_M_A_N
Reply

Logout Mark Read Team Forum Stats Members Help
Fix DB when media has moved0