Win Library import results in items without details
#1
Hi,

hopefully you can help me with my problem:

Win7 64, Eden (not beta)

Part of the library is local content and the other half was scraped from a network share (path: smb:\\ etc.). I backed up the userdata and library (single file export), because I moved all the previously network shared files to a local hdd.
Next step was replacing the smb paths in the videodb.xml with the new local path. After the import all the files appeared in the library and I can play them all, but the moved entries have no episode or movie details, watched status etc. As soon as I update the library all of those moved items get scraped again, resulting in duplicate entries. What am I doing wrong?
I imported the library once with the old db still in the folder and a second time with no db files present - result is the same.
Debug log says this when trying to get info on a episode (yes, I removed the path, it's shown in the debug):

18:04:10 T:4632 DEBUG: CVideoDatabase::GetEpisodeId (L:\Series\..., query = select idEpisode from episode where idFile=15455
18:04:10 T:4632 ERROR: CGUIWindowVideoBase::ShowIMDB: could not add episode [L:\Series\.... tvshow does not exist yet..


And this happens when trying to open a movie info:

18:03:35 T:4632 DEBUG: VideoInfoScanner: No NFO file found. Using title search for 'L:\Movies\moviename'


Reply
#2
The database sees the moved files as new files. That is why this is happening. Just editing the .xml file does not edit the actual database. The best way to move content is to export your library to separate files. Then move things and add the new path and re-scan them in. This will be quick because all the files will have the .nfos with them. Once that is done you can kill all the .nfo files if you like. You will still loose watched status and any resume points.

For the brave, you can get a SQLlite viewer and edit the .db files to find/replace the old path with the new path.
Reply
#3
Thanks for your replay, kricker.

How can xbmc see the files as moved when I deleted the myvideos...db and then imported the xml, thus building a compelte new db? The db has no entry in the path table under strPath with the old path - only the new paths from the edited xml.
I'd like to avoid exporting to separate files, I don't like the clutter and I would have to move other files to make space.
Reply
#4
I think I misunderstood what you did.

So you exported the library as a single file, then edited that? I've never really tried that myself. I understand not liking the clutter of the .nfo files, that is why I suggested deleting them after the items have been scanned into the library. Have you ran the clean library option in order to remove all the old copies of the items that have been moved? Did you remove the old source from videos? Look in your sources.xml file in your userdata folder. Is the old path still in there?
Reply
#5
Yes, I exported it to a single file, then edited (replaced all the paths) the videodb.xml file. Then I imported it. First with the old database myvideo60.db still there and the second time I deleted the db before importing. Directly after importing there are no duplicate or old entries with the old path. Everything plays fine from the new source, but the moved stuff has no info or details, I can't open the info window that you open with the episode/movie information button. And as soon as I update the library all the moved files get scraped again resulting in the duplicate entries, but now I can open the info window on both entries - and they are the same path etc.
I also removed the old sources and added the new ones - always through the UI - I think I tried every combination, like adding a second path to a source, making a new one etc.

The files in the library are valid so that I can play them, but all the metadata, thumbnails is not referenced to the files or was not imported? I think there is the error, but I can't figure it out.
Reply
#6
You still haven't mentioned if you actually removed the old source from your Videos. Did you look through the sources.xml file yet?
Reply
#7
Yes, I did mention that. I removed the sources and I changed the path of the sources - both methods made no difference. Yes, I checked the sources.xml.
Reply
#8
Okay. I missed where you said you removed the old source from videos.

Quote:Next step was replacing the smb paths in the videodb.xml with the new local path. After the import all the files appeared in the library and I can play them all, but the moved entries have no episode or movie details, watched status etc.

Quote:Yes, I exported it to a single file, then edited (replaced all the paths) the videodb.xml file. Then I imported it.

So an overview of the steps you took:

1. Export DB to single file backup.
2. Removed old source from videos section (A dialog should have asked if you would like to remove all items from the library; answer: yes.)
3. Edit DB backup file to reflect the new path
4. Import edited Library backup file



Reply
#9
Again, yes that were the things I did. I also deleted the database files in the userdata folder to have a completely emptied xbmc. Same outcome.
The files are displayed after the import and can be played with the new path, but the thumbnails don't work and there is no info on the items, so the scraper gets them again resulting in duplicates.
Well, seems like nobody can help me with that and I'm not the only one encountering this problem, but all the threads here had no solution. I exported all the files now separately. If it interests anyone, although the nfo files have a <showlink> tag with an entry it won't get imported into the new library and has to be set manually.
Reply
#10
So did the separate file export and move work as it should, except for that <showlink> tag? Is the <showlink> tag where it associates a movie to a TV series?
Reply
#11
Yes, it did work, but it's a bit more tedious than the single import, if it would work Smile. Because you have to set the scraping order for tv shows (dvd or aired) again for every show needed, you lose the the ordering of recently added files and the links of movies to tvshows.
Yes, that's the tag for the tv show the movie should be associated with.
And back to the db stuff. I know SQL and relational databases, but not how xbmc associates things, because in the DB there were no old paths left, so I'm pretty sure the problem is with the lost association of thumbnails and the other info. But only the devs could clear this up, I guess.
Reply

Logout Mark Read Team Forum Stats Members Help
Library import results in items without details0